From b0d7600970d2fdb1eb6fff813c7336ea34d4e228 Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Fri, 28 Aug 2026 22:22:24 +0200 Subject: Indent tweaks --- server/src/util.cppm | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'server/src/util.cppm') diff --git a/server/src/util.cppm b/server/src/util.cppm index 2e20e8b..bdccf10 100644 --- a/server/src/util.cppm +++ b/server/src/util.cppm @@ -14,9 +14,9 @@ struct overloaded : Ts... }; export constexpr auto parse_double( - std::string_view s, - std::chars_format fmt = std::chars_format::general) noexcept - -> std::optional + std::string_view s, + std::chars_format fmt = std::chars_format::general) noexcept + -> std::optional { auto x = 0.0; auto [_, ec] = std::from_chars(s.data(), s.data() + s.size(), x, fmt); @@ -31,9 +31,9 @@ export constexpr auto parse_double( } export constexpr auto parse_float( - std::string_view s, - std::chars_format fmt = std::chars_format::general) noexcept - -> std::optional + std::string_view s, + std::chars_format fmt = std::chars_format::general) noexcept + -> std::optional { auto x = 0.0; auto [_, ec] = std::from_chars(s.data(), s.data() + s.size(), x, fmt); @@ -62,7 +62,7 @@ public: static auto nil() -> std::shared_ptr> { return nullptr; } static auto cons(T v, std::shared_ptr const> l) - -> std::shared_ptr> + -> std::shared_ptr> { return std::shared_ptr>{new aolist{v, l}}; } @@ -75,8 +75,8 @@ public: export constexpr auto size_from_int(int x) -> std::optional { static_assert( - sizeof(int) <= sizeof(std::size_t), - "cannot cast int to smaller size_t type"); + sizeof(int) <= sizeof(std::size_t), + "cannot cast int to smaller size_t type"); if (x < 0) return std::nullopt; return static_cast(x); @@ -155,7 +155,8 @@ public: { s_ = rhs.s_; length_.store( - rhs.length_.load(std::memory_order_acquire), std::memory_order_release); + rhs.length_.load(std::memory_order_acquire), + std::memory_order_release); } return *this; } @@ -202,7 +203,7 @@ public: }; constexpr auto operator""_zsv(char const* s, std::size_t length) noexcept - -> zstring_view + -> zstring_view { return zstring_view{s, length}; } @@ -213,7 +214,7 @@ auto operator==(zstring_view lhs, zstring_view rhs) -> bool } export constexpr auto split_on(std::string_view s, char c) - -> std::pair> + -> std::pair> { if (auto i = s.find(c); i != std::string_view::npos) return std::make_pair(s.substr(0, i), s.substr(i + 1)); -- cgit v1.3