summaryrefslogtreecommitdiff
path: root/core/fxge/android/cfpf_skiafontmgr.cpp
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/fxge/android/cfpf_skiafontmgr.cpp
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/fxge/android/cfpf_skiafontmgr.cpp')
-rw-r--r--core/fxge/android/cfpf_skiafontmgr.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/core/fxge/android/cfpf_skiafontmgr.cpp b/core/fxge/android/cfpf_skiafontmgr.cpp
index f9afdabb93..2288a86e92 100644
--- a/core/fxge/android/cfpf_skiafontmgr.cpp
+++ b/core/fxge/android/cfpf_skiafontmgr.cpp
@@ -252,9 +252,9 @@ CFPF_SkiaFont* CFPF_SkiaFontMgr::CreateFont(const ByteStringView& bsFamilyname,
uint8_t uCharset,
uint32_t dwStyle) {
uint32_t dwHash = FPF_SKIAGetFamilyHash(bsFamilyname, dwStyle, uCharset);
- auto it = m_FamilyFonts.find(dwHash);
- if (it != m_FamilyFonts.end())
- return it->second.get();
+ auto family_iter = m_FamilyFonts.find(dwHash);
+ if (family_iter != m_FamilyFonts.end())
+ return family_iter->second.get();
uint32_t dwFaceName = FPF_SKIANormalizeFontName(bsFamilyname);
uint32_t dwSubst = FPF_SkiaGetSubstFont(dwFaceName, g_SkiaFontmap,
@@ -273,8 +273,9 @@ CFPF_SkiaFont* CFPF_SkiaFontMgr::CreateFont(const ByteStringView& bsFamilyname,
const CFPF_SkiaPathFont* pBestFont = nullptr;
int32_t nMax = -1;
int32_t nGlyphNum = 0;
- for (auto it = m_FontFaces.rbegin(); it != m_FontFaces.rend(); ++it) {
- const CFPF_SkiaPathFont* pFont = it->get();
+ for (auto face_iter = m_FontFaces.rbegin(); face_iter != m_FontFaces.rend();
+ ++face_iter) {
+ const CFPF_SkiaPathFont* pFont = face_iter->get();
if (!(pFont->charsets() & FPF_SkiaGetCharset(uCharset)))
continue;
int32_t nFind = 0;
@@ -301,19 +302,19 @@ CFPF_SkiaFont* CFPF_SkiaFontMgr::CreateFont(const ByteStringView& bsFamilyname,
if (uCharset == FX_CHARSET_Default || bMaybeSymbol) {
if (nFind > nMax && bMatchedName) {
nMax = nFind;
- pBestFont = it->get();
+ pBestFont = face_iter->get();
}
} else if (FPF_SkiaIsCJK(uCharset)) {
if (bMatchedName || pFont->glyph_num() > nGlyphNum) {
- pBestFont = it->get();
+ pBestFont = face_iter->get();
nGlyphNum = pFont->glyph_num();
}
} else if (nFind > nMax) {
nMax = nFind;
- pBestFont = it->get();
+ pBestFont = face_iter->get();
}
if (nExpectVal <= nFind) {
- pBestFont = it->get();
+ pBestFont = face_iter->get();
break;
}
}