From 5ad314459a3935645d4c1d1447da9c3caf1c4c00 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 14 Sep 2018 21:06:26 +0000 Subject: Clean up CFGAS_GEFont members. Remove unused members and initialize the rest in the header. Change-Id: Ic2122fc1d49024632b9ebd4cb490c14dd0724de6 Reviewed-on: https://pdfium-review.googlesource.com/42491 Reviewed-by: Tom Sepez Commit-Queue: Lei Zhang --- xfa/fgas/font/cfgas_gefont.cpp | 9 +-------- xfa/fgas/font/cfgas_gefont.h | 12 +++++------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/xfa/fgas/font/cfgas_gefont.cpp b/xfa/fgas/font/cfgas_gefont.cpp index b5cb7962af..0a57f54cdd 100644 --- a/xfa/fgas/font/cfgas_gefont.cpp +++ b/xfa/fgas/font/cfgas_gefont.cpp @@ -54,14 +54,7 @@ RetainPtr CFGAS_GEFont::LoadFont( return pFont; } -CFGAS_GEFont::CFGAS_GEFont(CFGAS_FontMgr* pFontMgr) - : - m_bUseLogFontStyle(false), - m_dwLogFontStyle(0), - m_pFont(nullptr), - m_bExternalFont(false), - m_pFontMgr(pFontMgr) { -} +CFGAS_GEFont::CFGAS_GEFont(CFGAS_FontMgr* pFontMgr) : m_pFontMgr(pFontMgr) {} CFGAS_GEFont::~CFGAS_GEFont() { if (!m_bExternalFont) diff --git a/xfa/fgas/font/cfgas_gefont.h b/xfa/fgas/font/cfgas_gefont.h index 685fa68200..2eadd5aaae 100644 --- a/xfa/fgas/font/cfgas_gefont.h +++ b/xfa/fgas/font/cfgas_gefont.h @@ -70,13 +70,11 @@ class CFGAS_GEFont final : public Retainable { bool bRecursive); WideString GetFamilyName() const; - bool m_bUseLogFontStyle; - uint32_t m_dwLogFontStyle; - CFX_Font* m_pFont; - bool m_bExternalFont; - RetainPtr m_pSrcFont; // Only set by ctor, so no cycles. - CFGAS_FontMgr::ObservedPtr m_pFontMgr; - RetainPtr m_pFileRead; + bool m_bUseLogFontStyle = false; + bool m_bExternalFont = false; + uint32_t m_dwLogFontStyle = 0; + CFX_Font* m_pFont = nullptr; + CFGAS_FontMgr::ObservedPtr const m_pFontMgr; std::unique_ptr m_pFontEncoding; std::map m_CharWidthMap; std::map m_BBoxMap; -- cgit v1.2.3