Chromium Code Reviews| Index: xfa/fde/css/fde_cssdatatable.cpp |
| diff --git a/xfa/fde/css/fde_cssdatatable.cpp b/xfa/fde/css/fde_cssdatatable.cpp |
| index 3b090a2699200a84227754ff4b22b006bd3efe54..ea6f203f10b967b618ff4fcf1818d59e62f0ba08 100644 |
| --- a/xfa/fde/css/fde_cssdatatable.cpp |
| +++ b/xfa/fde/css/fde_cssdatatable.cpp |
| @@ -11,6 +11,30 @@ |
| #include "xfa/fgas/crt/fgas_codepage.h" |
| #include "xfa/fgas/crt/fgas_system.h" |
| +namespace { |
| + |
| +const uint8_t g_FXHex2DecMap[256] = { |
|
Tom Sepez
2016/05/18 22:01:21
seems like a lot of wasted space. In particular w
dsinclair
2016/05/19 14:24:44
Removed completely, we already have a FXSYS_toHexD
|
| + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, |
| + 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, |
| + 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| +}; |
| + |
| +uint8_t FX_Hex2Dec(uint8_t hexHigh, uint8_t hexLow) { |
| + return (g_FXHex2DecMap[hexHigh] << 4) + g_FXHex2DecMap[hexLow]; |
| +} |
| + |
| +} // namespace |
| + |
| FX_BOOL FDE_CSSLengthToFloat(const FDE_CSSLENGTH& len, |
| FX_FLOAT fPercentBase, |
| FX_FLOAT& fResult) { |