From 03395da5d5827b6b3049d8632d8d3f5545e45293 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Sat, 4 Aug 2018 02:21:44 +0000 Subject: Set the CPDF_Font doc / font dict in the ctor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Then we can mark the doc pointer as const because it never changes again. Also move initialization to headers when possible, add missing dtors, and fix some nits. Change-Id: I461affc8dce14d805b935fb4d8b5aaafb058a789 Reviewed-on: https://pdfium-review.googlesource.com/39413 Reviewed-by: Nicolás Peña Moreno Commit-Queue: Lei Zhang --- core/fpdfapi/font/cpdf_cidfont.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'core/fpdfapi/font/cpdf_cidfont.cpp') diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp index ef471d02f1..b25b728ce0 100644 --- a/core/fpdfapi/font/cpdf_cidfont.cpp +++ b/core/fpdfapi/font/cpdf_cidfont.cpp @@ -207,11 +207,8 @@ bool IsMetricForCID(const uint32_t* pEntry, uint16_t CID) { } // namespace -CPDF_CIDFont::CPDF_CIDFont() - : m_pCID2UnicodeMap(nullptr), - m_bCIDIsGID(false), - m_bAnsiWidthsFixed(false), - m_bAdobeCourierStd(false) { +CPDF_CIDFont::CPDF_CIDFont(CPDF_Document* pDocument, CPDF_Dictionary* pFontDict) + : CPDF_Font(pDocument, pFontDict) { for (size_t i = 0; i < FX_ArraySize(m_CharBBox); ++i) m_CharBBox[i] = FX_RECT(-1, -1, -1, -1); } -- cgit v1.2.3