Improve const correctness

This commit is contained in:
Chris Thrasher 2025-02-16 13:33:00 -07:00
parent 8c9ffe972f
commit d4bb96dc77
No known key found for this signature in database
GPG Key ID: 56FB686C9DFC8E2C

View File

@ -198,7 +198,7 @@ Out Utf<8>::fromWide(In begin, In end, Out output)
{
while (begin != end)
{
char32_t codepoint = Utf<32>::decodeWide(*begin++);
const char32_t codepoint = Utf<32>::decodeWide(*begin++);
output = encode(codepoint, output);
}
@ -411,7 +411,7 @@ 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);
const char32_t codepoint = Utf<32>::decodeAnsi(*begin++, locale);
output = encode(codepoint, output);
}
@ -425,7 +425,7 @@ Out Utf<16>::fromWide(In begin, In end, Out output)
{
while (begin != end)
{
char32_t codepoint = Utf<32>::decodeWide(*begin++);
const char32_t codepoint = Utf<32>::decodeWide(*begin++);
output = encode(codepoint, output);
}