aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/PlatGTK.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-03-25 13:44:06 +1100
committerNeil <nyamatongwe@gmail.com>2019-03-25 13:44:06 +1100
commitb2a9562d5b76db78d5c124821ce724e342b35369 (patch)
tree18b1de9a01d22fcb001fb25b6f6fb61743507c28 /gtk/PlatGTK.cxx
parent045980dcfa1f8c28ebaaedad961dce3d6a175c51 (diff)
downloadscintilla-mirror-b2a9562d5b76db78d5c124821ce724e342b35369.tar.gz
Simplify with range for.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rw-r--r--gtk/PlatGTK.cxx4
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 {