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 | bcdda18c2aa062fea2f754cb600f0b4ef94b300b (patch) | |
| tree | 2220dee16cde5dd5394521436e000a02a7d0d2df /win32/PlatWin.cxx | |
| parent | ae17fbc86661c895d08fad5416a1452bdef04d32 (diff) | |
| download | scintilla-mirror-bcdda18c2aa062fea2f754cb600f0b4ef94b300b.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); |
