From eec3a366adbfada36b98f1de651546ee09df8fc0 Mon Sep 17 00:00:00 2001 From: weili Date: Sat, 18 Jun 2016 06:25:37 -0700 Subject: Make code compile with clang_use_chrome_plugin (final) This change mainly contains files in xfa/ and fxjse/ directories which were not covered by previous changes. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. After this change, PDFium can be compiled with "clang_use_chrome_plugin=true" for GN build. Since clang_use_chrome_plugin is true by default, we no longer need to set this parameter explicitly. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2072803002 --- xfa/fgas/font/fgas_stdfontmgr.cpp | 4 ++++ xfa/fgas/font/fgas_stdfontmgr.h | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'xfa/fgas/font') diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp index c6c1b19ef7..fc839e9209 100644 --- a/xfa/fgas/font/fgas_stdfontmgr.cpp +++ b/xfa/fgas/font/fgas_stdfontmgr.cpp @@ -42,6 +42,10 @@ CFGAS_StdFontMgrImp::~CFGAS_StdFontMgrImp() { m_Fonts[i]->Release(); } +void CFGAS_StdFontMgrImp::Release() { + delete this; +} + CFGAS_GEFont* CFGAS_StdFontMgrImp::GetDefFontByCodePage( uint16_t wCodePage, uint32_t dwFontStyles, diff --git a/xfa/fgas/font/fgas_stdfontmgr.h b/xfa/fgas/font/fgas_stdfontmgr.h index b20c942a36..11d91fc7f5 100644 --- a/xfa/fgas/font/fgas_stdfontmgr.h +++ b/xfa/fgas/font/fgas_stdfontmgr.h @@ -24,7 +24,7 @@ class CFGAS_StdFontMgrImp : public IFGAS_FontMgr { ~CFGAS_StdFontMgrImp() override; // IFGAS_FontMgr: - void Release() override { delete this; } + void Release() override; CFGAS_GEFont* GetDefFontByCodePage( uint16_t wCodePage, uint32_t dwFontStyles, @@ -65,7 +65,6 @@ class CFGAS_StdFontMgrImp : public IFGAS_FontMgr { uint16_t wCodePage, uint32_t dwUSB = 999, FX_WCHAR wUnicode = 0); - CFGAS_GEFont* GetFont(FX_FONTDESCRIPTOR const* pFD, uint32_t dwFontStyles); FX_LPEnumAllFonts m_pEnumerator; CFX_FontDescriptors m_FontFaces; -- cgit v1.2.3