summaryrefslogtreecommitdiff
path: root/xfa/fde/cfx_wordbreak.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-02 15:48:15 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-02 15:48:16 -0700
commitdb444d2063df6c574882d9263e885c4fe1134133 (patch)
tree27ce4a3f181ae0b5ad4eff6893016e7d49dfce0a /xfa/fde/cfx_wordbreak.cpp
parentad700c2c1fc3c3843dae71e5982f462e42efc987 (diff)
downloadpdfium-db444d2063df6c574882d9263e885c4fe1134133.tar.xz
Fix all the code which has duplicate variable declarations
When there are duplicate variable declarations, the inner names shadow the outter ones. This is error prone and harder to read. Remove all the instances found by /analyze. BUG=chromium:613623, chromium:427616 Review-Url: https://codereview.chromium.org/2027273002
Diffstat (limited to 'xfa/fde/cfx_wordbreak.cpp')
-rw-r--r--xfa/fde/cfx_wordbreak.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/xfa/fde/cfx_wordbreak.cpp b/xfa/fde/cfx_wordbreak.cpp
index 5b220df60e..a9aa75b622 100644
--- a/xfa/fde/cfx_wordbreak.cpp
+++ b/xfa/fde/cfx_wordbreak.cpp
@@ -2859,17 +2859,14 @@ FX_BOOL CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
}
if (!(bFromNext || pIter->IsEOF(bPrev))) {
pIter->Next(!bPrev);
- FX_WCHAR wcTemp = pIter->GetChar();
- ePreType = GetWordBreakProperty(wcTemp);
+ ePreType = GetWordBreakProperty(pIter->GetChar());
pIter->Next(bPrev);
}
- FX_WCHAR wcTemp = pIter->GetChar();
- eCurType = GetWordBreakProperty(wcTemp);
+ eCurType = GetWordBreakProperty(pIter->GetChar());
FX_BOOL bFirst = TRUE;
do {
pIter->Next(bPrev);
- FX_WCHAR wcTemp = pIter->GetChar();
- eNextType = GetWordBreakProperty(wcTemp);
+ eNextType = GetWordBreakProperty(pIter->GetChar());
uint16_t wBreak =
gs_FX_WordBreak_Table[eCurType] & ((uint16_t)(1 << eNextType));
if (wBreak) {
@@ -2929,8 +2926,7 @@ FX_BOOL CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
}
ASSERT(nFlags <= 2);
pIter->Next(bPrev);
- wcTemp = pIter->GetChar();
- eNextType = (FX_WordBreakProp)GetWordBreakProperty(wcTemp);
+ eNextType = (FX_WordBreakProp)GetWordBreakProperty(pIter->GetChar());
if (!((nFlags == 1 && eNextType == FX_WordBreakProp_ALetter) ||
(nFlags == 2 && eNextType == FX_WordBreakProp_Numberic))) {
pIter->Next(!bPrev);