From 1972b16849fedfda675eacd5c8594b54dbd1264d Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 12 Jun 2015 19:14:11 -0700 Subject: 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. --- fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'fpdfsdk') 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) -- cgit v1.2.3