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

Unified Diff: core/fxge/ge/fx_ge_fontmap.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/fxge/apple/fx_quartz_device.cpp ('k') | core/fxge/win32/fx_win32_print.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/ge/fx_ge_fontmap.cpp
diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp
index 1dc61a210fa8e98a16d6f84e92e9a94ea5e67429..441c87b18daf69ebb4375fe091af00c86ccbf766 100644
--- a/core/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/fxge/ge/fx_ge_fontmap.cpp
@@ -14,7 +14,7 @@
#include "core/include/fxge/fx_ge.h"
#include "third_party/base/stl_util.h"
-#define GET_TT_SHORT(w) (FX_WORD)(((w)[0] << 8) | (w)[1])
+#define GET_TT_SHORT(w) (uint16_t)(((w)[0] << 8) | (w)[1])
#define GET_TT_LONG(w) \
(FX_DWORD)(((w)[0] << 24) | ((w)[1] << 16) | ((w)[2] << 8) | (w)[3])
@@ -199,7 +199,7 @@ const struct FX_FontStyle {
};
const struct CODEPAGE_MAP {
- FX_WORD codepage;
+ uint16_t codepage;
uint8_t charset;
} g_Codepage2CharsetTable[] = {
{0, 1}, {42, 2}, {437, 254}, {850, 255}, {874, 222},
@@ -281,12 +281,12 @@ CFX_ByteString FPDF_LoadTableFromTT(FXSYS_FILE* pFile,
return CFX_ByteString();
}
-uint8_t GetCharsetFromCodePage(FX_WORD codepage) {
+uint8_t GetCharsetFromCodePage(uint16_t codepage) {
const CODEPAGE_MAP* pEnd =
g_Codepage2CharsetTable + FX_ArraySize(g_Codepage2CharsetTable);
const CODEPAGE_MAP* pCharmap =
std::lower_bound(g_Codepage2CharsetTable, pEnd, codepage,
- [](const CODEPAGE_MAP& charset, FX_WORD page) {
+ [](const CODEPAGE_MAP& charset, uint16_t page) {
return charset.codepage < page;
});
if (pCharmap < pEnd && codepage == pCharmap->codepage)
« no previous file with comments | « core/fxge/apple/fx_quartz_device.cpp ('k') | core/fxge/win32/fx_win32_print.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698