diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-22 08:35:01 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-22 08:35:01 +1000 |
commit | 8f9a43df028d13c1bc6654aa6dcf66dd542843d2 (patch) | |
tree | 677c3aae65caee744f4ce00478f40dcfec7147bc /src/UniConversion.cxx | |
parent | afcd6f1fa748f2ade19010b3307c341b382818de (diff) | |
download | scintilla-mirror-8f9a43df028d13c1bc6654aa6dcf66dd542843d2.tar.gz |
Backport: Remove casts between char and unsigned char where possible.
Backport of changeset 6731:8e06234817c0.
Diffstat (limited to 'src/UniConversion.cxx')
-rw-r--r-- | src/UniConversion.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/UniConversion.cxx b/src/UniConversion.cxx index 04b8891cb..64599afaf 100644 --- a/src/UniConversion.cxx +++ b/src/UniConversion.cxx @@ -87,9 +87,8 @@ void UTF8FromUTF32Character(int uch, char *putf) { size_t UTF16Length(const char *s, size_t len) { size_t ulen = 0; - const unsigned char *us = reinterpret_cast<const unsigned char *>(s); for (size_t i = 0; i < len;) { - const unsigned char ch = us[i]; + const unsigned char ch = s[i]; const unsigned int byteCount = UTF8BytesOfLead[ch]; const unsigned int utf16Len = UTF16LengthFromUTF8ByteCount(byteCount); i += byteCount; |