diff options
author | Neil <nyamatongwe@gmail.com> | 2015-01-13 09:44:35 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2015-01-13 09:44:35 +1100 |
commit | 26d30bc6e730a3be9757b174da30ba756496521b (patch) | |
tree | ec37dad1f0043372a833459197ebd251dd3ec9b5 /win32/PlatWin.cxx | |
parent | 8fae337a69f913cf46b4c5fce780b0920563e2e8 (diff) | |
download | scintilla-mirror-26d30bc6e730a3be9757b174da30ba756496521b.tar.gz |
Using size_t instead of unsigned int for conversions to UTF16 for 64-bit
compatibility and to lessen the number of casts.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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<unsigned int>(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<wchar_t, stackBufferLength>(len) { if (unicodeMode) { - tlen = UTF16FromUTF8(s, len, buffer, len); + tlen = static_cast<int>(UTF16FromUTF8(s, len, buffer, len)); } else { // Support Asian string display in 9x English tlen = ::MultiByteToWideChar(codePage, 0, s, len, buffer, len); |