diff options
Diffstat (limited to 'core/fxcrt')
-rw-r--r-- | core/fxcrt/fx_arabic.cpp | 14 | ||||
-rw-r--r-- | core/fxcrt/fx_basic_wstring.cpp | 8 | ||||
-rw-r--r-- | core/fxcrt/fx_unicode.cpp | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/core/fxcrt/fx_arabic.cpp b/core/fxcrt/fx_arabic.cpp index dfc3d802e5..f28b916c59 100644 --- a/core/fxcrt/fx_arabic.cpp +++ b/core/fxcrt/fx_arabic.cpp @@ -150,19 +150,19 @@ IFX_ArabicChar* IFX_ArabicChar::Create() { } FX_BOOL CFX_ArabicChar::IsArabicChar(FX_WCHAR wch) const { FX_DWORD dwRet = - kTextLayoutCodeProperties[(FX_WORD)wch] & FX_CHARTYPEBITSMASK; + kTextLayoutCodeProperties[(uint16_t)wch] & FX_CHARTYPEBITSMASK; return dwRet >= FX_CHARTYPE_ArabicAlef; } FX_BOOL CFX_ArabicChar::IsArabicFormChar(FX_WCHAR wch) const { - return (kTextLayoutCodeProperties[(FX_WORD)wch] & FX_CHARTYPEBITSMASK) == + return (kTextLayoutCodeProperties[(uint16_t)wch] & FX_CHARTYPEBITSMASK) == FX_CHARTYPE_ArabicForm; } FX_WCHAR CFX_ArabicChar::GetFormChar(FX_WCHAR wch, FX_WCHAR prev, FX_WCHAR next) const { - CFX_Char c(wch, kTextLayoutCodeProperties[(FX_WORD)wch]); - CFX_Char p(prev, kTextLayoutCodeProperties[(FX_WORD)prev]); - CFX_Char n(next, kTextLayoutCodeProperties[(FX_WORD)next]); + CFX_Char c(wch, kTextLayoutCodeProperties[(uint16_t)wch]); + CFX_Char p(prev, kTextLayoutCodeProperties[(uint16_t)prev]); + CFX_Char n(next, kTextLayoutCodeProperties[(uint16_t)next]); return GetFormChar(&c, &p, &n); } FX_WCHAR CFX_ArabicChar::GetFormChar(const CFX_Char* cur, @@ -262,7 +262,7 @@ void FX_BidiClassify(const CFX_WideString& wsText, for (int32_t i = 0; i < iCount; i++) { wch = *pwsStart++; iCls = - ((kTextLayoutCodeProperties[(FX_WORD)wch] & FX_BIDICLASSBITSMASK) >> + ((kTextLayoutCodeProperties[(uint16_t)wch] & FX_BIDICLASSBITSMASK) >> FX_BIDICLASSBITS); classes.SetAt(i, iCls); } @@ -270,7 +270,7 @@ void FX_BidiClassify(const CFX_WideString& wsText, for (int32_t i = 0; i < iCount; i++) { wch = *pwsStart++; iCls = - ((kTextLayoutCodeProperties[(FX_WORD)wch] & FX_BIDICLASSBITSMASK) >> + ((kTextLayoutCodeProperties[(uint16_t)wch] & FX_BIDICLASSBITSMASK) >> FX_BIDICLASSBITS); classes.SetAt(i, gc_FX_BidiNTypes[iCls]); } diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp index 8282bd5014..89e3f8b1fd 100644 --- a/core/fxcrt/fx_basic_wstring.cpp +++ b/core/fxcrt/fx_basic_wstring.cpp @@ -16,7 +16,7 @@ namespace { #ifndef NDEBUG -bool IsValidCodePage(FX_WORD codepage) { +bool IsValidCodePage(uint16_t codepage) { switch (codepage) { case 0: case 932: @@ -367,7 +367,7 @@ CFX_WideString CFX_WideString::FromLocal(const CFX_ByteString& str) { // static CFX_WideString CFX_WideString::FromCodePage(const CFX_ByteString& str, - FX_WORD codepage) { + uint16_t codepage) { return CFX_CharMap::GetWideString(codepage, str); } @@ -1017,7 +1017,7 @@ FX_FLOAT CFX_WideString::GetFloat() const { } // static -CFX_ByteString CFX_CharMap::GetByteString(FX_WORD codepage, +CFX_ByteString CFX_CharMap::GetByteString(uint16_t codepage, const CFX_WideString& wstr) { FXSYS_assert(IsValidCodePage(codepage)); int src_len = wstr.GetLength(); @@ -1034,7 +1034,7 @@ CFX_ByteString CFX_CharMap::GetByteString(FX_WORD codepage, } // static -CFX_WideString CFX_CharMap::GetWideString(FX_WORD codepage, +CFX_WideString CFX_CharMap::GetWideString(uint16_t codepage, const CFX_ByteString& bstr) { FXSYS_assert(IsValidCodePage(codepage)); int src_len = bstr.GetLength(); diff --git a/core/fxcrt/fx_unicode.cpp b/core/fxcrt/fx_unicode.cpp index 140bab0b27..9094c65294 100644 --- a/core/fxcrt/fx_unicode.cpp +++ b/core/fxcrt/fx_unicode.cpp @@ -9,7 +9,7 @@ FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch) { size_t idx = static_cast<size_t>(wch); if (idx < kTextLayoutCodePropertiesSize) - return kTextLayoutCodeProperties[(FX_WORD)wch]; + return kTextLayoutCodeProperties[(uint16_t)wch]; return 0; } |