summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/extension.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-14 14:07:43 -0700
committerLei Zhang <thestig@chromium.org>2015-08-14 14:07:43 -0700
commitc2c3f7b5f0396409451a9d344f35ec1929a76e9f (patch)
treeb1c696afdca13e8087e18014b19a6c82415f72d5 /core/src/fxcrt/extension.h
parentc6540e037ed1a9546d5a90455bf440a24b181ab4 (diff)
downloadpdfium-c2c3f7b5f0396409451a9d344f35ec1929a76e9f.tar.xz
Use override in more classes in core/
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1292613003 .
Diffstat (limited to 'core/src/fxcrt/extension.h')
-rw-r--r--core/src/fxcrt/extension.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index 7d14cb0b9a..a712fa3770 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -30,10 +30,11 @@ class IFXCRT_FileAccess {
virtual FX_BOOL Truncate(FX_FILESIZE szFile) = 0;
};
IFXCRT_FileAccess* FXCRT_FileAccess_Create();
+
class CFX_CRTFileStream final : public IFX_FileStream {
public:
CFX_CRTFileStream(IFXCRT_FileAccess* pFA) : m_pFile(pFA), m_dwCount(1) {}
- ~CFX_CRTFileStream() {
+ ~CFX_CRTFileStream() override {
if (m_pFile) {
m_pFile->Release();
}
@@ -70,6 +71,7 @@ class CFX_CRTFileStream final : public IFX_FileStream {
IFXCRT_FileAccess* m_pFile;
FX_DWORD m_dwCount;
};
+
#define FX_MEMSTREAM_BlockSize (64 * 1024)
#define FX_MEMSTREAM_Consecutive 0x01
#define FX_MEMSTREAM_TakeOver 0x02
@@ -94,7 +96,7 @@ class CFX_MemoryStream final : public IFX_MemoryStream {
m_dwFlags =
FX_MEMSTREAM_Consecutive | (bTakeOver ? FX_MEMSTREAM_TakeOver : 0);
}
- ~CFX_MemoryStream() {
+ ~CFX_MemoryStream() override {
if (m_dwFlags & FX_MEMSTREAM_TakeOver) {
for (int32_t i = 0; i < m_Blocks.GetSize(); i++) {
FX_Free((uint8_t*)m_Blocks[i]);
@@ -287,6 +289,7 @@ class CFX_MemoryStream final : public IFX_MemoryStream {
return TRUE;
}
};
+
#ifdef __cplusplus
extern "C" {
#endif