From f7cab317b777bb8fedb4bd8f4eeb7e68bf712989 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 22 Apr 2018 08:35:01 +1000 Subject: Remove casts between char and unsigned char where possible. --- src/UniConversion.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/UniConversion.cxx') 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(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; -- cgit v1.2.3