aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/UniConversion.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-04-22 08:35:01 +1000
committerNeil <nyamatongwe@gmail.com>2018-04-22 08:35:01 +1000
commitf7cab317b777bb8fedb4bd8f4eeb7e68bf712989 (patch)
treea80432017efd0e8b427bb7b2e3cd6eedf48de57d /src/UniConversion.cxx
parentdc7c28cfcf21c18f96a49f2cc0818d4f676bd301 (diff)
downloadscintilla-mirror-f7cab317b777bb8fedb4bd8f4eeb7e68bf712989.tar.gz
Remove casts between char and unsigned char where possible.
Diffstat (limited to 'src/UniConversion.cxx')
-rw-r--r--src/UniConversion.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/UniConversion.cxx b/src/UniConversion.cxx
index fb50b9277..c17e85d3a 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;