aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-04-25 17:42:11 +1000
committerNeil <nyamatongwe@gmail.com>2018-04-25 17:42:11 +1000
commit3c82cfba7bd67e03a70fb24e9e7940b7ffc251d0 (patch)
tree55a69aba695cde5ca7f065dec206d46cac5dee3e /win32
parentfdc720a5a23e10a6b7ff4f51362db9ed5181aa8d (diff)
downloadscintilla-mirror-3c82cfba7bd67e03a70fb24e9e7940b7ffc251d0.tar.gz
Backport: Remove variables and casts that are not needed.
Backport of changeset 6739:e204054d5d07.
Diffstat (limited to 'win32')
-rw-r--r--win32/PlatWin.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 75f883f24..487ae055b 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -983,9 +983,8 @@ void SurfaceGDI::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *
return;
}
// Map the widths given for UTF-16 characters back onto the UTF-8 input string
- const unsigned char *us = reinterpret_cast<const unsigned char *>(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++;
@@ -1655,10 +1654,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<const unsigned char *>(s);
int i=0;
while (ui<tbuf.tlen) {
- const unsigned char uch = us[i];
+ const unsigned char uch = s[i];
const unsigned int byteCount = UTF8BytesOfLead[uch];
if (byteCount == 4) { // Non-BMP
ui++;