From d2e8643607424cd74616e2e863f5609e7b8458a5 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Wed, 24 Aug 2016 21:45:03 +0200 Subject: Fixed type-casting-related warnings. --- src/StringUtils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/StringUtils.cpp') diff --git a/src/StringUtils.cpp b/src/StringUtils.cpp index 8ea94ecd7..521aa79f4 100644 --- a/src/StringUtils.cpp +++ b/src/StringUtils.cpp @@ -558,8 +558,8 @@ std::u16string UTF8ToRawBEUTF16(const AString & a_UTF8) { // target is a character in range 0xFFFF - 0x10FFFF. ch -= halfBase; - unsigned short v1 = htons((ch >> halfShift) + UNI_SUR_HIGH_START); - unsigned short v2 = htons((ch & halfMask) + UNI_SUR_LOW_START); + auto v1 = htons(static_cast((ch >> halfShift) + UNI_SUR_HIGH_START)); + auto v2 = htons(static_cast((ch & halfMask) + UNI_SUR_LOW_START)); UTF16.push_back(static_cast(v1)); UTF16.push_back(static_cast(v2)); } -- cgit v1.2.3