diff options
-rw-r--r-- | gtk/PlatGTK.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 7d555e312..8a33b81d4 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -635,8 +635,8 @@ std::unique_ptr<IScreenLineLayout> SurfaceImpl::Layout(const IScreenLine *) { std::string UTF8FromLatin1(std::string_view text) { std::string utfForm(text.length()*2 + 1, '\0'); size_t lenU = 0; - for (size_t i=0; i<text.length(); i++) { - unsigned int uch = static_cast<unsigned char>(text[i]); + for (char ch : text) { + const unsigned char uch = ch; if (uch < 0x80) { utfForm[lenU++] = uch; } else { |