From 9cab4958e6e2212217d34f765089911254fbc36b Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 3 Jan 2024 16:43:01 -0500 Subject: [PATCH] AK: Convert a couple String-related declarations to east-const Caught by clang-format-17. Note that clang-format-16 is fine with this as well (it leaves the const placement alone), it just doesn't perform the formatting to east-const itself. --- AK/ByteString.h | 2 +- AK/StringUtils.cpp | 4 ++-- AK/StringView.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AK/ByteString.h b/AK/ByteString.h index 024d2f5f05..34046f3e19 100644 --- a/AK/ByteString.h +++ b/AK/ByteString.h @@ -189,7 +189,7 @@ public: return bit_cast((*m_impl)[i]); } - using ConstIterator = SimpleIterator; + using ConstIterator = SimpleIterator; [[nodiscard]] constexpr ConstIterator begin() const { return ConstIterator::begin(*this); } [[nodiscard]] constexpr ConstIterator end() const { return ConstIterator::end(*this); } diff --git a/AK/StringUtils.cpp b/AK/StringUtils.cpp index 5952003055..23d41c0335 100644 --- a/AK/StringUtils.cpp +++ b/AK/StringUtils.cpp @@ -174,7 +174,7 @@ Optional convert_to_uint_from_hex(StringView str, TrimWhitespace trim_whitesp T value = 0; auto const count = string.length(); - const T upper_bound = NumericLimits::max(); + T const upper_bound = NumericLimits::max(); for (size_t i = 0; i < count; i++) { char digit = string[i]; @@ -213,7 +213,7 @@ Optional convert_to_uint_from_octal(StringView str, TrimWhitespace trim_white T value = 0; auto const count = string.length(); - const T upper_bound = NumericLimits::max(); + T const upper_bound = NumericLimits::max(); for (size_t i = 0; i < count; i++) { char digit = string[i]; diff --git a/AK/StringView.h b/AK/StringView.h index 31c5172461..00a1955929 100644 --- a/AK/StringView.h +++ b/AK/StringView.h @@ -83,7 +83,7 @@ public: return m_characters[index]; } - using ConstIterator = SimpleIterator; + using ConstIterator = SimpleIterator; [[nodiscard]] constexpr ConstIterator begin() const { return ConstIterator::begin(*this); } [[nodiscard]] constexpr ConstIterator end() const { return ConstIterator::end(*this); }