summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-12 19:14:11 -0700
committerLei Zhang <thestig@chromium.org>2015-06-12 19:14:11 -0700
commit1972b16849fedfda675eacd5c8594b54dbd1264d (patch)
tree114ce0930a4af4cf5d861b5e84f0d9d7168ec935 /fpdfsdk/src/formfiller
parent3218fffe6f92b62d05ab5c2d1c78285a0a0f0647 (diff)
downloadpdfium-1972b16849fedfda675eacd5c8594b54dbd1264d.tar.xz
Remove unneeded checks in CPDF_DocPageData::GetFontFileStreamAcc().
The input cannot be null. Same for CPDF_Document::LoadFontFile(). Also set the contract for CPDF_Document::LoadFont() and adjust callers accordingly. Also remove unused CPDF_Document::FindFont(). R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1184673002.
Diffstat (limited to 'fpdfsdk/src/formfiller')
-rw-r--r--fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index 24095c843f..699a7e4ffe 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -286,10 +286,7 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString &sAlias)
}
}
- if (pFontDict)
- return m_pDocument->LoadFont(pFontDict);
- else
- return NULL;
+ return pFontDict ? m_pDocument->LoadFont(pFontDict) : nullptr;
}
void CBA_FontMap::SetAPType(const CFX_ByteString& sAPType)