diff options
author | Lei Zhang <thestig@chromium.org> | 2015-06-19 16:46:40 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-06-19 16:46:40 -0700 |
commit | 51915328af0b5a7a45f547e1e42b232489a1d3fa (patch) | |
tree | 3ad846290c1862fa6f15ec4a7b58073da89f38ff /core/include/fxcrt/fx_basic.h | |
parent | 568aff520b4ca33d851317a4ea88807b4fd2da40 (diff) | |
download | pdfium-51915328af0b5a7a45f547e1e42b232489a1d3fa.tar.xz |
Merge to XFA: Fix -Winconsistent-missing-override warnings.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1187463003.
(cherry picked from commit 8bd09648445aef8a9ae38d9f61618bd2013ac3f0)
Review URL: https://codereview.chromium.org/1194173002.
Diffstat (limited to 'core/include/fxcrt/fx_basic.h')
-rw-r--r-- | core/include/fxcrt/fx_basic.h | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index b5a110b86f..dcc1081f44 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -228,58 +228,61 @@ protected: const uint8_t* m_pLoadingBuf; FX_DWORD m_LoadingSize; + }; + class IFX_BufferArchive { public: IFX_BufferArchive(FX_STRSIZE size); - virtual ~IFX_BufferArchive() { } - - virtual void Clear(); + virtual ~IFX_BufferArchive() {} + virtual void Clear(); - FX_BOOL Flush(); + FX_BOOL Flush(); + int32_t AppendBlock(const void* pBuf, size_t size); - int32_t AppendBlock(const void* pBuf, size_t size); + int32_t AppendByte(uint8_t byte); - int32_t AppendByte(uint8_t byte); + int32_t AppendDWord(FX_DWORD i); - int32_t AppendDWord(FX_DWORD i); - - int32_t AppendString(const CFX_ByteStringC& lpsz); + int32_t AppendString(const CFX_ByteStringC& lpsz); protected: - virtual FX_BOOL DoWork(const void* pBuf, size_t size) = 0; + virtual FX_BOOL DoWork(const void* pBuf, size_t size) = 0; - FX_STRSIZE m_BufSize; + FX_STRSIZE m_BufSize; - uint8_t* m_pBuffer; + uint8_t* m_pBuffer; - FX_STRSIZE m_Length; + FX_STRSIZE m_Length; }; + class CFX_FileBufferArchive : public IFX_BufferArchive { public: CFX_FileBufferArchive(FX_STRSIZE size = 32768); ~CFX_FileBufferArchive() override; - virtual void Clear(); - FX_BOOL AttachFile(IFX_StreamWrite *pFile, FX_BOOL bTakeover = FALSE); + void Clear() override; - FX_BOOL AttachFile(const FX_WCHAR* filename); + FX_BOOL AttachFile(IFX_StreamWrite *pFile, FX_BOOL bTakeover = FALSE); - FX_BOOL AttachFile(const FX_CHAR* filename); -private: + FX_BOOL AttachFile(const FX_WCHAR* filename); - virtual FX_BOOL DoWork(const void* pBuf, size_t size); + FX_BOOL AttachFile(const FX_CHAR* filename); - IFX_StreamWrite *m_pFile; +private: + FX_BOOL DoWork(const void* pBuf, size_t size) override; - FX_BOOL m_bTakeover; + IFX_StreamWrite* m_pFile; + + FX_BOOL m_bTakeover; }; + struct CFX_CharMap { static CFX_CharMap* GetDefaultMapper(int32_t codepage = 0); |