aboutsummaryrefslogtreecommitdiff
path: root/libs/kstd
diff options
context:
space:
mode:
Diffstat (limited to 'libs/kstd')
-rw-r--r--libs/kstd/include/kstd/bits/shared_ptr.hpp6
-rw-r--r--libs/kstd/include/kstd/bits/unique_ptr.hpp6
-rw-r--r--libs/kstd/src/libc/stdlib.cpp5
-rw-r--r--libs/kstd/src/libc/string.cpp2
-rw-r--r--libs/kstd/src/mutex.cpp10
5 files changed, 19 insertions, 10 deletions
diff --git a/libs/kstd/include/kstd/bits/shared_ptr.hpp b/libs/kstd/include/kstd/bits/shared_ptr.hpp
index d41b165..251c187 100644
--- a/libs/kstd/include/kstd/bits/shared_ptr.hpp
+++ b/libs/kstd/include/kstd/bits/shared_ptr.hpp
@@ -39,7 +39,7 @@ namespace kstd
* @param other The shared_ptr to copy from.
*/
[[gnu::section(".stl_text")]]
- shared_ptr(const shared_ptr & other)
+ shared_ptr(shared_ptr const & other)
: pointer(other.pointer)
, ref_count(other.ref_count)
{
@@ -72,7 +72,7 @@ namespace kstd
* @return Reference to this shared pointer.
*/
[[gnu::section(".stl_text")]]
- shared_ptr & operator=(const shared_ptr & other)
+ shared_ptr & operator=(shared_ptr const & other)
{
if (this != &other)
{
@@ -216,7 +216,7 @@ namespace kstd
* @brief Defaulted three-way comparator operator.
*/
[[gnu::section(".stl_text")]]
- auto operator<=>(const shared_ptr & other) const = default;
+ auto operator<=>(shared_ptr const & other) const = default;
private:
/**
diff --git a/libs/kstd/include/kstd/bits/unique_ptr.hpp b/libs/kstd/include/kstd/bits/unique_ptr.hpp
index 1932913..5f54848 100644
--- a/libs/kstd/include/kstd/bits/unique_ptr.hpp
+++ b/libs/kstd/include/kstd/bits/unique_ptr.hpp
@@ -38,12 +38,12 @@ namespace kstd
/**
* @brief Deleted copy constructor to enforce unique ownership.
*/
- unique_ptr(const unique_ptr &) = delete;
+ unique_ptr(unique_ptr const &) = delete;
/**
* @brief Deleted copy assignment operator to enforce unique ownership.
*/
- auto operator=(const unique_ptr &) -> unique_ptr & = delete;
+ auto operator=(unique_ptr const &) -> unique_ptr & = delete;
/**
* @brief Move constructor.
@@ -167,7 +167,7 @@ namespace kstd
* @brief Defaulted three-way comparator operator.
*/
[[gnu::section(".stl_text")]]
- auto operator<=>(const unique_ptr & other) const = default;
+ auto operator<=>(unique_ptr const & other) const = default;
private:
T * pointer; ///< The managed pointer.
diff --git a/libs/kstd/src/libc/stdlib.cpp b/libs/kstd/src/libc/stdlib.cpp
index fe1bc95..752e616 100644
--- a/libs/kstd/src/libc/stdlib.cpp
+++ b/libs/kstd/src/libc/stdlib.cpp
@@ -5,7 +5,10 @@ namespace kstd::libc
extern "C"
{
- [[noreturn]] auto abort() -> void { kstd::os::abort(); }
+ [[noreturn]] auto abort() -> void
+ {
+ kstd::os::abort();
+ }
}
} // namespace kstd::libc \ No newline at end of file
diff --git a/libs/kstd/src/libc/string.cpp b/libs/kstd/src/libc/string.cpp
index c6b3847..a42aedc 100644
--- a/libs/kstd/src/libc/string.cpp
+++ b/libs/kstd/src/libc/string.cpp
@@ -6,7 +6,7 @@ namespace kstd::libc
extern "C"
{
- auto strlen(const char * string) -> std::size_t
+ auto strlen(char const * string) -> std::size_t
{
return std::distance(string, std::ranges::find(string, nullptr, '\0'));
}
diff --git a/libs/kstd/src/mutex.cpp b/libs/kstd/src/mutex.cpp
index 137ebc0..da1357f 100644
--- a/libs/kstd/src/mutex.cpp
+++ b/libs/kstd/src/mutex.cpp
@@ -10,7 +10,13 @@ namespace kstd
}
}
- auto mutex::try_lock() -> bool { return !locked.exchange(true, std::memory_order_acquire); }
+ auto mutex::try_lock() -> bool
+ {
+ return !locked.exchange(true, std::memory_order_acquire);
+ }
- auto mutex::unlock() -> void { locked.store(false, std::memory_order_release); }
+ auto mutex::unlock() -> void
+ {
+ locked.store(false, std::memory_order_release);
+ }
} // namespace kstd