From 8f9a43df028d13c1bc6654aa6dcf66dd542843d2 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 22 Apr 2018 08:35:01 +1000 Subject: Backport: Remove casts between char and unsigned char where possible. Backport of changeset 6731:8e06234817c0. --- 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 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(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