Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1715)

Unified Diff: core/fxcrt/fx_arabic.cpp

Issue 1821043003: Remove FX_WORD in favor of uint16_t. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use stdint.h directly, bitfield minefield. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxcodec/lgif/fx_gif.cpp ('k') | core/fxcrt/fx_basic_wstring.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/fx_arabic.cpp
diff --git a/core/fxcrt/fx_arabic.cpp b/core/fxcrt/fx_arabic.cpp
index dfc3d802e53dc72c7ab71da0d639d53bffc35f3f..f28b916c598c7abbc097ec107594e498818eab8e 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]);
}
« no previous file with comments | « core/fxcodec/lgif/fx_gif.cpp ('k') | core/fxcrt/fx_basic_wstring.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698