summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_dataavail.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-14 22:16:22 -0700
committerLei Zhang <thestig@chromium.org>2015-08-14 22:16:22 -0700
commit2b1a2d528469cda4e9f3e36d3c7a649e0d476480 (patch)
tree91eea8ae70b87c632a06fba52ea06c0842e30878 /fpdfsdk/src/fpdf_dataavail.cpp
parent62b2e912dc2a508972fbf01b25f7449c39ff1543 (diff)
downloadpdfium-2b1a2d528469cda4e9f3e36d3c7a649e0d476480.tar.xz
Merge to XFA: Use override in more classes in fpdfsdk/
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1287193005 . (cherry picked from commit 0f6b51c0fdd14f5762bf3c7412ac59c825443cc3) Review URL: https://codereview.chromium.org/1288393004 .
Diffstat (limited to 'fpdfsdk/src/fpdf_dataavail.cpp')
-rw-r--r--fpdfsdk/src/fpdf_dataavail.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp
index 4100fe2db9..b9cf69d647 100644
--- a/fpdfsdk/src/fpdf_dataavail.cpp
+++ b/fpdfsdk/src/fpdf_dataavail.cpp
@@ -14,10 +14,12 @@ extern void ProcessParseError(FX_DWORD err_code);
class CFPDF_FileAvailWrap : public IFX_FileAvail {
public:
CFPDF_FileAvailWrap() { m_pfileAvail = NULL; }
+ ~CFPDF_FileAvailWrap() override {}
void Set(FX_FILEAVAIL* pfileAvail) { m_pfileAvail = pfileAvail; }
- virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) {
+ // IFX_FileAvail
+ FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) override {
return m_pfileAvail->IsDataAvail(m_pfileAvail, offset, size);
}
@@ -28,17 +30,19 @@ class CFPDF_FileAvailWrap : public IFX_FileAvail {
class CFPDF_FileAccessWrap : public IFX_FileRead {
public:
CFPDF_FileAccessWrap() { m_pFileAccess = NULL; }
+ ~CFPDF_FileAccessWrap() override {}
void Set(FPDF_FILEACCESS* pFile) { m_pFileAccess = pFile; }
- virtual FX_FILESIZE GetSize() { return m_pFileAccess->m_FileLen; }
+ // IFX_FileRead
+ FX_FILESIZE GetSize() override { return m_pFileAccess->m_FileLen; }
- virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) {
+ FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override {
return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset,
(uint8_t*)buffer, size);
}
- virtual void Release() {}
+ void Release() override {}
private:
FPDF_FILEACCESS* m_pFileAccess;
@@ -46,12 +50,14 @@ class CFPDF_FileAccessWrap : public IFX_FileRead {
class CFPDF_DownloadHintsWrap : public IFX_DownloadHints {
public:
- CFPDF_DownloadHintsWrap(FX_DOWNLOADHINTS* pDownloadHints) {
+ explicit CFPDF_DownloadHintsWrap(FX_DOWNLOADHINTS* pDownloadHints) {
m_pDownloadHints = pDownloadHints;
}
+ ~CFPDF_DownloadHintsWrap() override {}
public:
- virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) {
+ // IFX_DownloadHints
+ void AddSegment(FX_FILESIZE offset, FX_DWORD size) override {
m_pDownloadHints->AddSegment(m_pDownloadHints, offset, size);
}