diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-22 22:06:49 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-22 22:06:49 +0000 |
commit | 86688dea3b0d30741a95fd15b5f9ee57b2ae86f1 (patch) | |
tree | a858f201cdc8d0823496dcfcf15d22bff1c402a8 /fpdfsdk/fpdf_dataavail.cpp | |
parent | 96c9517296c94cfa643d6197c8227879d88876d9 (diff) | |
download | pdfium-86688dea3b0d30741a95fd15b5f9ee57b2ae86f1.tar.xz |
Make friend RetainPtr<T> statements consistently public.
Also make destructors private for RetainPtr sub-classes, and add missing
destructors.
Change-Id: I451bf0aae2dae943b1f450d0aa4ca5124dc578fd
Reviewed-on: https://pdfium-review.googlesource.com/32853
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_dataavail.cpp')
-rw-r--r-- | fpdfsdk/fpdf_dataavail.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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; }; |