summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/src/fpdfview.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index d03db35035..19faea5cc9 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -166,9 +166,9 @@ class CMemFile final : public IFX_FileRead {
public:
CMemFile(uint8_t* pBuf, FX_FILESIZE size) : m_pBuf(pBuf), m_size(size) {}
- virtual void Release() { delete this; }
- virtual FX_FILESIZE GetSize() { return m_size; }
- virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) {
+ void Release() override { delete this; }
+ FX_FILESIZE GetSize() override { return m_size; }
+ FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override {
if (offset < 0) {
return FALSE;
}
@@ -185,9 +185,10 @@ class CMemFile final : public IFX_FileRead {
private:
~CMemFile() override {}
- uint8_t* m_pBuf;
- FX_FILESIZE m_size;
+ uint8_t* const m_pBuf;
+ const FX_FILESIZE m_size;
};
+
DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadMemDocument(const void* data_buf,
int size,
FPDF_BYTESTRING password) {