summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fsdk_define.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2014-08-13 17:12:28 -0700
committerTom Sepez <tsepez@chromium.org>2014-08-13 17:12:28 -0700
commit368ed462dd6e5e63977ca2b2e56a7e83b3a3bdda (patch)
treed6e9f37c824646a245d2753fe93a8404da52dbff /fpdfsdk/include/fsdk_define.h
parent2fd7b0be4473f4c9877fed2c2ade403c71ded395 (diff)
downloadpdfium-368ed462dd6e5e63977ca2b2e56a7e83b3a3bdda.tar.xz
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
Diffstat (limited to 'fpdfsdk/include/fsdk_define.h')
-rw-r--r--fpdfsdk/include/fsdk_define.h12
1 files changed, 4 insertions, 8 deletions
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);