From 87fdbc371e023be8aa996e5aa5485524818c8a07 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 14 Aug 2018 18:34:26 +0000 Subject: Add CPDF_Type1Font::IsBase14Font() to replace GetBase14Font(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IsBase14Font() is what its only caller really needs. Also use it in Load() which does the same check, and restructure Load() to have an early return. Change-Id: I1d051d10b80aa82bcf590c79169ffe29607b3c13 Reviewed-on: https://pdfium-review.googlesource.com/39970 Commit-Queue: Lei Zhang Reviewed-by: Nicolás Peña Moreno --- core/fpdfapi/font/cpdf_font.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core/fpdfapi/font/cpdf_font.cpp') diff --git a/core/fpdfapi/font/cpdf_font.cpp b/core/fpdfapi/font/cpdf_font.cpp index f2aa4da052..9b83733eea 100644 --- a/core/fpdfapi/font/cpdf_font.cpp +++ b/core/fpdfapi/font/cpdf_font.cpp @@ -346,9 +346,7 @@ bool CPDF_Font::IsStandardFont() const { return false; if (m_pFontFile) return false; - if (AsType1Font()->GetBase14Font() < 0) - return false; - return true; + return AsType1Font()->IsBase14Font(); } const char* CPDF_Font::GetAdobeCharName( -- cgit v1.2.3