From 625ad667d0c0c17d5bc11d505f04861d90b45078 Mon Sep 17 00:00:00 2001 From: weili Date: Wed, 15 Jun 2016 11:21:33 -0700 Subject: Make code compile with clang_use_chrome_plugin (part IV) This change mainly contains files in fpdfsdk/ directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. 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 plus removing an unused file and splitting cxfa_eventparam out from fxfa.h BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2062313002 --- fpdfsdk/include/fsdk_define.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fpdfsdk/include/fsdk_define.h') diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h index 4a470206d3..89c3e739a7 100644 --- a/fpdfsdk/include/fsdk_define.h +++ b/fpdfsdk/include/fsdk_define.h @@ -40,12 +40,12 @@ class CPDF_CustomAccess final : public IFX_FileRead { ~CPDF_CustomAccess() override {} // IFX_FileRead - FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; } - void Release() override { delete this; } + FX_FILESIZE GetSize() override; + void Release() override; FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; #ifdef PDF_ENABLE_XFA - virtual CFX_ByteString GetFullPath() { return ""; } + virtual CFX_ByteString GetFullPath(); virtual FX_BOOL GetByte(uint32_t pos, uint8_t& ch); virtual FX_BOOL GetBlock(uint32_t pos, uint8_t* pBuf, uint32_t size); #endif // PDF_ENABLE_XFA @@ -69,7 +69,7 @@ class CFPDF_FileStream : public IFX_FileStream { void Release() override; FX_FILESIZE GetSize() override; FX_BOOL IsEOF() override; - FX_FILESIZE GetPosition() override { return m_nCurPos; } + FX_FILESIZE GetPosition() override; FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; size_t ReadBlock(void* buffer, size_t size) override; FX_BOOL WriteBlock(const void* buffer, -- cgit v1.2.3