summaryrefslogtreecommitdiff
path: root/core/fpdftext
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-08-23 20:58:14 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-23 20:58:14 +0000
commit203339a2aa88bb31576233220d7ced73920a596f (patch)
tree895fc5fcc07107c8cc6f81b9c6e0f12faef9fc1e /core/fpdftext
parent3b45012d57884b06915eb5a1f54fbba04a45e807 (diff)
downloadpdfium-203339a2aa88bb31576233220d7ced73920a596f.tar.xz
Fix shadowed variables
This CL fixes instances of variable shadowing that are discovered by turning on -Wshadow. BUG=pdfium:1137 Change-Id: I418d50de89ecbeb12e85b23a358bc61e8f16e888 Reviewed-on: https://pdfium-review.googlesource.com/41150 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdftext')
-rw-r--r--core/fpdftext/cpdf_textpage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index 2353317796..8375d1f8cc 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -494,11 +494,11 @@ void CPDF_TextPage::CheckMarkedContentObject(int32_t* pStart,
if (FPDFTEXT_CHAR_PIECE == charinfo2.m_Flag) {
PAGECHAR_INFO charinfo3 = charinfo2;
int endIndex = start + nCount - 1;
- const int nCount = CountChars();
+ const int innerCount = CountChars();
while (FPDFTEXT_CHAR_PIECE == charinfo3.m_Flag &&
charinfo3.m_Index == charinfo2.m_Index) {
endIndex++;
- if (endIndex >= nCount)
+ if (endIndex >= innerCount)
break;
charinfo3 = m_CharList[endIndex];
}
@@ -1316,8 +1316,8 @@ CPDF_TextPage::GenerateCharacter CPDF_TextPage::ProcessInsertObject(
if (re.Contains(pObj->GetPos())) {
bNewline = false;
} else {
- CFX_FloatRect rect(0, pObj->m_Bottom, 1000, pObj->m_Top);
- if (rect.Contains(m_pPreTextObj->GetPos()))
+ if (CFX_FloatRect(0, pObj->m_Bottom, 1000, pObj->m_Top)
+ .Contains(m_pPreTextObj->GetPos()))
bNewline = false;
}
}