diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-03-18 09:32:06 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-03-18 09:32:06 -0700 |
commit | 314743a4a752716b8e977482ad6c757c70d019db (patch) | |
tree | 3bb2332e5232c1b37e9da0ccb02aec2e87de1a00 /core/fpdftext/unicodenormalization.cpp | |
parent | 3420909bbb47d6e47d6c561cbcce06d056fdf0a3 (diff) | |
download | pdfium-314743a4a752716b8e977482ad6c757c70d019db.tar.xz |
Reduce size of several PDFium constant tables.
Either by using the smallest possible data type, or
By accurately calcuating the bounds, or
Moving to array of pointers for varying length rows.
Notes:
The 929 is reassuring since PDF417 barcode uses GF(929).
FX_WCHAR is 4 bytes on unix (2 on windows).
Binary looks to be about 240k smaller on linux/64
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1807373002 .
Diffstat (limited to 'core/fpdftext/unicodenormalization.cpp')
-rw-r--r-- | core/fpdftext/unicodenormalization.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdftext/unicodenormalization.cpp b/core/fpdftext/unicodenormalization.cpp index b8e8eb98d3..dd563e5ee3 100644 --- a/core/fpdftext/unicodenormalization.cpp +++ b/core/fpdftext/unicodenormalization.cpp @@ -11,7 +11,7 @@ namespace { -const FX_WCHAR* const g_UnicodeData_Normalization_Maps[5] = { +const uint16_t* const g_UnicodeData_Normalization_Maps[5] = { nullptr, g_UnicodeData_Normalization_Map1, g_UnicodeData_Normalization_Map2, g_UnicodeData_Normalization_Map3, g_UnicodeData_Normalization_Map4}; @@ -33,7 +33,7 @@ FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst) { wch = wFind & 0x0FFF; wFind >>= 12; } - const FX_WCHAR* pMap = g_UnicodeData_Normalization_Maps[wFind]; + const uint16_t* pMap = g_UnicodeData_Normalization_Maps[wFind]; if (pMap == g_UnicodeData_Normalization_Map4) { pMap = g_UnicodeData_Normalization_Map4 + wch; wFind = (FX_WCHAR)(*pMap++); |