From bcdda18c2aa062fea2f754cb600f0b4ef94b300b Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 13 Jan 2015 09:44:35 +1100 Subject: Using size_t instead of unsigned int for conversions to UTF16 for 64-bit compatibility and to lessen the number of casts. --- win32/PlatWin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'win32/PlatWin.cxx') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index b0a5fb512..853473e11 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -331,7 +331,7 @@ FontCached::FontCached(const FontParameters &fp) : IDWriteTextFormat *pTextFormat; const int faceSize = 200; WCHAR wszFace[faceSize]; - UTF16FromUTF8(fp.faceName, static_cast(strlen(fp.faceName))+1, wszFace, faceSize); + UTF16FromUTF8(fp.faceName, strlen(fp.faceName)+1, wszFace, faceSize); FLOAT fHeight = fp.size; DWRITE_FONT_STYLE style = fp.italic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL; HRESULT hr = pIDWriteFactory->CreateTextFormat(wszFace, NULL, @@ -486,7 +486,7 @@ public: TextWide(const char *s, int len, bool unicodeMode, int codePage=0) : VarBuffer(len) { if (unicodeMode) { - tlen = UTF16FromUTF8(s, len, buffer, len); + tlen = static_cast(UTF16FromUTF8(s, len, buffer, len)); } else { // Support Asian string display in 9x English tlen = ::MultiByteToWideChar(codePage, 0, s, len, buffer, len); -- cgit v1.2.3