diff options
author | tsepez <tsepez@chromium.org> | 2016-06-10 15:24:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-10 15:24:47 -0700 |
commit | f49747f5fc85ea2acf0c5ff0ab589ad791bf6648 (patch) | |
tree | 228b9f8422f52e4193af4e851eb4a5c1bab9dc80 /xfa/fgas/layout/fgas_textbreak.cpp | |
parent | 17e15d2fea4a3567ca84b964125da5020ecd60fe (diff) | |
download | pdfium-f49747f5fc85ea2acf0c5ff0ab589ad791bf6648.tar.xz |
Trust the compiler to do array indexing and superclass promotion.
Review-Url: https://codereview.chromium.org/2063463002
Diffstat (limited to 'xfa/fgas/layout/fgas_textbreak.cpp')
-rw-r--r-- | xfa/fgas/layout/fgas_textbreak.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp index 56850c741c..c8d33baa80 100644 --- a/xfa/fgas/layout/fgas_textbreak.cpp +++ b/xfa/fgas/layout/fgas_textbreak.cpp @@ -1014,8 +1014,7 @@ int32_t CFX_TxtBreak::GetBreakPos(CFX_TxtCharArray& ca, if (nNext == FX_CBP_SP) { eType = bSpaceBreak ? FX_LBT_DIRECT_BRK : FX_LBT_PROHIBITED_BRK; } else { - eType = *((const FX_LINEBREAKTYPE*)gs_FX_LineBreak_PairTable + - (nCur << 5) + nNext); + eType = gs_FX_LineBreak_PairTable[nCur][nNext]; } } else if (bNumberBreak && nCur == FX_CBP_NU && nNext == FX_CBP_NU) { eType = FX_LBT_DIRECT_BRK; @@ -1023,8 +1022,7 @@ int32_t CFX_TxtBreak::GetBreakPos(CFX_TxtCharArray& ca, if (nNext == FX_CBP_SP) { eType = FX_LBT_PROHIBITED_BRK; } else { - eType = *((const FX_LINEBREAKTYPE*)gs_FX_LineBreak_PairTable + - (nCur << 5) + nNext); + eType = gs_FX_LineBreak_PairTable[nCur][nNext]; } } if (bAllChars) { |