From af00d95fc02843ba3cae8d7d076fd43a171d6afd Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 25 Apr 2018 17:42:11 +1000 Subject: Remove variables and casts that are not needed. --- cocoa/PlatCocoa.mm | 4 ++-- qt/ScintillaEditBase/PlatQt.cpp | 4 ++-- win32/PlatWin.cxx | 6 ++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 606927995..763778342 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -892,10 +892,10 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION // Map the widths given for UTF-16 characters back onto the UTF-8 input string CFIndex fit = textLayout->getStringLength(); int ui=0; - const unsigned char *us = reinterpret_cast(s); int i=0; while (ui(s); int i=0; while (ui(s); for (int ui = 0; ui < fit; ui++) { - const unsigned char uch = us[i]; + const unsigned char uch = s[i]; const unsigned int byteCount = UTF8BytesOfLead[uch]; if (byteCount == 4) { // Non-BMP ui++; @@ -1654,10 +1653,9 @@ void SurfaceD2D::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION * if (unicodeMode) { // Map the widths given for UTF-16 characters back onto the UTF-8 input string int ui=0; - const unsigned char *us = reinterpret_cast(s); int i=0; while (ui