From b2a9562d5b76db78d5c124821ce724e342b35369 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 25 Mar 2019 13:44:06 +1100 Subject: Simplify with range for. --- gtk/PlatGTK.cxx | 4 ++-- 1 file 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 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[i]); + for (char ch : text) { + const unsigned char uch = ch; if (uch < 0x80) { utfForm[lenU++] = uch; } else { -- cgit v1.2.3