summaryrefslogtreecommitdiff
path: root/core/src/fxge/ge/fx_ge_fontmap.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-22 14:59:55 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-22 14:59:55 -0700
commit7cc97521db1e52d5927f5605de5f9a7102f8af40 (patch)
treedf96cf98cd470e794c7817f347511f3c554c96e4 /core/src/fxge/ge/fx_ge_fontmap.cpp
parentb05f1fd710496dea44b001bb905fa1c16a39bb28 (diff)
downloadpdfium-7cc97521db1e52d5927f5605de5f9a7102f8af40.tar.xz
Fix else-after-returns throughout pdfium.
Driven by CS search for pcre:yes file:third_party/pdfium/ -file:pdfium/third_party/ \breturn\b[^;]*;\s*\n*\s*\}*\s*\n*\r*else Note: Care is required to ensure the preceding block is not an else-if. As usual, removed any tabs I saw. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1243883003 .
Diffstat (limited to 'core/src/fxge/ge/fx_ge_fontmap.cpp')
-rw-r--r--core/src/fxge/ge/fx_ge_fontmap.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 8956cd1c88..4674589911 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -688,7 +688,8 @@ uint8_t _GetCharsetFromCodePage(FX_WORD codepage)
const CHARSET_MAP & cp = g_Codepage2CharsetTable[iMid];
if (codepage == cp.codepage) {
return cp.charset;
- } else if (codepage < cp.codepage) {
+ }
+ if (codepage < cp.codepage) {
iEnd = iMid - 1;
} else {
iStart = iMid + 1;
@@ -1159,14 +1160,10 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
m_pFontMgr->GetStandardFont(pFontData, size, 12);
m_FoxitFaces[12] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
return m_FoxitFaces[12];
- } else {
- pSubstFont->m_SubstFlags |= FXFONT_SUBST_NONSYMBOL;
- return FindSubstFont(family, bTrueType, flags & ~FXFONT_SYMBOLIC, weight, italic_angle, 0, pSubstFont);
}
-#else
+#endif
pSubstFont->m_SubstFlags |= FXFONT_SUBST_NONSYMBOL;
return FindSubstFont(family, bTrueType, flags & ~FXFONT_SYMBOLIC, weight, italic_angle, 0, pSubstFont);
-#endif
}
if (Charset == FXFONT_ANSI_CHARSET) {
pSubstFont->m_SubstFlags |= FXFONT_SUBST_STANDARD;
@@ -1175,9 +1172,8 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
int index = m_CharsetArray.Find(Charset);
if (index < 0) {
return UseInternalSubst(pSubstFont, iBaseFont, italic_angle, old_weight, PitchFamily);
- } else {
- hFont = m_pFontInfo->GetFont(m_FaceArray[index]);
}
+ hFont = m_pFontInfo->GetFont(m_FaceArray[index]);
}
}
pSubstFont->m_ExtHandle = m_pFontInfo->RetainFont(hFont);