summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_customaccess.cpp2
-rw-r--r--fpdfsdk/cpdfsdk_customaccess.h1
-rw-r--r--fpdfsdk/cpdfsdk_filewriteadapter.h1
-rw-r--r--fpdfsdk/cpdfsdk_helpers.cpp3
-rw-r--r--fpdfsdk/cpdfsdk_memoryaccess.h4
-rw-r--r--fpdfsdk/fpdf_dataavail.cpp5
6 files changed, 9 insertions, 7 deletions
diff --git a/fpdfsdk/cpdfsdk_customaccess.cpp b/fpdfsdk/cpdfsdk_customaccess.cpp
index 0545ae44fa..9a16a873ae 100644
--- a/fpdfsdk/cpdfsdk_customaccess.cpp
+++ b/fpdfsdk/cpdfsdk_customaccess.cpp
@@ -9,6 +9,8 @@
CPDFSDK_CustomAccess::CPDFSDK_CustomAccess(FPDF_FILEACCESS* pFileAccess)
: m_FileAccess(*pFileAccess) {}
+CPDFSDK_CustomAccess::~CPDFSDK_CustomAccess() = default;
+
FX_FILESIZE CPDFSDK_CustomAccess::GetSize() {
return m_FileAccess.m_FileLen;
}
diff --git a/fpdfsdk/cpdfsdk_customaccess.h b/fpdfsdk/cpdfsdk_customaccess.h
index dabbdf2b39..cc38eb88f4 100644
--- a/fpdfsdk/cpdfsdk_customaccess.h
+++ b/fpdfsdk/cpdfsdk_customaccess.h
@@ -21,6 +21,7 @@ class CPDFSDK_CustomAccess final : public IFX_SeekableReadStream {
private:
explicit CPDFSDK_CustomAccess(FPDF_FILEACCESS* pFileAccess);
+ ~CPDFSDK_CustomAccess() override;
FPDF_FILEACCESS m_FileAccess;
};
diff --git a/fpdfsdk/cpdfsdk_filewriteadapter.h b/fpdfsdk/cpdfsdk_filewriteadapter.h
index a5b4dc89f9..e452d1cc20 100644
--- a/fpdfsdk/cpdfsdk_filewriteadapter.h
+++ b/fpdfsdk/cpdfsdk_filewriteadapter.h
@@ -16,6 +16,7 @@ class CPDFSDK_FileWriteAdapter : public IFX_WriteStream {
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
+ // IFX_WriteStream:
bool WriteBlock(const void* data, size_t size) override;
bool WriteString(const ByteStringView& str) override;
diff --git a/fpdfsdk/cpdfsdk_helpers.cpp b/fpdfsdk/cpdfsdk_helpers.cpp
index 5498909c32..0836325263 100644
--- a/fpdfsdk/cpdfsdk_helpers.cpp
+++ b/fpdfsdk/cpdfsdk_helpers.cpp
@@ -43,8 +43,6 @@ class FPDF_FileHandlerContext : public IFX_SeekableStream {
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
- ~FPDF_FileHandlerContext() override;
-
// IFX_SeekableStream:
FX_FILESIZE GetSize() override;
bool IsEOF() override;
@@ -58,6 +56,7 @@ class FPDF_FileHandlerContext : public IFX_SeekableStream {
protected:
explicit FPDF_FileHandlerContext(FPDF_FILEHANDLER* pFS);
+ ~FPDF_FileHandlerContext() override;
FPDF_FILEHANDLER* m_pFS;
FX_FILESIZE m_nCurPos;
diff --git a/fpdfsdk/cpdfsdk_memoryaccess.h b/fpdfsdk/cpdfsdk_memoryaccess.h
index 9d5a365804..ed9c80acb5 100644
--- a/fpdfsdk/cpdfsdk_memoryaccess.h
+++ b/fpdfsdk/cpdfsdk_memoryaccess.h
@@ -14,13 +14,13 @@ class CPDFSDK_MemoryAccess final : public IFX_SeekableReadStream {
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
- ~CPDFSDK_MemoryAccess() override;
-
+ // IFX_SeekableReadStream:
FX_FILESIZE GetSize() override;
bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
private:
CPDFSDK_MemoryAccess(const uint8_t* pBuf, FX_FILESIZE size);
+ ~CPDFSDK_MemoryAccess() override;
const uint8_t* const m_pBuf;
const FX_FILESIZE m_size;
diff --git a/fpdfsdk/fpdf_dataavail.cpp b/fpdfsdk/fpdf_dataavail.cpp
index 55d39a0d46..6f201d69f1 100644
--- a/fpdfsdk/fpdf_dataavail.cpp
+++ b/fpdfsdk/fpdf_dataavail.cpp
@@ -64,8 +64,6 @@ class FPDF_FileAccessContext : public IFX_SeekableReadStream {
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
- ~FPDF_FileAccessContext() override {}
-
void Set(FPDF_FILEACCESS* pFile) { m_pFileAccess = pFile; }
// IFX_SeekableReadStream
@@ -73,11 +71,12 @@ class FPDF_FileAccessContext : public IFX_SeekableReadStream {
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);
+ static_cast<uint8_t*>(buffer), size);
}
private:
FPDF_FileAccessContext() : m_pFileAccess(nullptr) {}
+ ~FPDF_FileAccessContext() override = default;
FPDF_FILEACCESS* m_pFileAccess;
};