From d4bb96dc77d53fe64af35501ebda719b965c6b09 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sun, 16 Feb 2025 13:33:00 -0700 Subject: [PATCH] Improve const correctness --- include/SFML/System/Utf.inl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/SFML/System/Utf.inl b/include/SFML/System/Utf.inl index 20763c71c..d634414c2 100644 --- a/include/SFML/System/Utf.inl +++ b/include/SFML/System/Utf.inl @@ -198,8 +198,8 @@ Out Utf<8>::fromWide(In begin, In end, Out output) { while (begin != end) { - char32_t codepoint = Utf<32>::decodeWide(*begin++); - output = encode(codepoint, output); + const char32_t codepoint = Utf<32>::decodeWide(*begin++); + output = encode(codepoint, output); } return output; @@ -411,8 +411,8 @@ Out Utf<16>::fromAnsi(In begin, In end, Out output, const std::locale& locale) { while (begin != end) { - char32_t codepoint = Utf<32>::decodeAnsi(*begin++, locale); - output = encode(codepoint, output); + const char32_t codepoint = Utf<32>::decodeAnsi(*begin++, locale); + output = encode(codepoint, output); } return output; @@ -425,8 +425,8 @@ Out Utf<16>::fromWide(In begin, In end, Out output) { while (begin != end) { - char32_t codepoint = Utf<32>::decodeWide(*begin++); - output = encode(codepoint, output); + const char32_t codepoint = Utf<32>::decodeWide(*begin++); + output = encode(codepoint, output); } return output;