From 368ed462dd6e5e63977ca2b2e56a7e83b3a3bdda Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 13 Aug 2014 17:12:28 -0700 Subject: Add FX_OVERRIDE and use it for virtual functions of FX_FINAL classes. Should there be cases where this fails to compile, it indicates a mistake, either an incorrectly declared overrriden virtual method, or a method that should be declared non-virtual. The only issues were with CPDF_CustomAccess::GetBlock(), CPDF_CustomAccess::GetByte(), and CPDF_CustomAccess::GetFullPath(). These don't appear to be used anywhere, and are removed. Two members are removed that are no longer needed once those methods are removed. R=jam@chromium.org, jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/454983003 --- fpdfsdk/include/fsdk_define.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'fpdfsdk/include') diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h index 433ff4c184..d249f0887f 100644 --- a/fpdfsdk/include/fsdk_define.h +++ b/fpdfsdk/include/fsdk_define.h @@ -107,18 +107,14 @@ public: CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); ~CPDF_CustomAccess() {} - virtual CFX_ByteString GetFullPath() { return ""; } - virtual FX_FILESIZE GetSize() { return m_FileAccess.m_FileLen; } + virtual FX_FILESIZE GetSize() FX_OVERRIDE { return m_FileAccess.m_FileLen; } - virtual FX_BOOL GetByte(FX_DWORD pos, FX_BYTE& ch); - virtual FX_BOOL GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size); - virtual void Release() { delete this; } + virtual void Release() FX_OVERRIDE { delete this; } - virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size); + virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) FX_OVERRIDE; +private: FPDF_FILEACCESS m_FileAccess; - FX_BYTE m_Buffer[512]; - FX_DWORD m_BufferOffset; }; void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable); -- cgit v1.2.3