From 8bd09648445aef8a9ae38d9f61618bd2013ac3f0 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 15 Jun 2015 11:41:44 -0700 Subject: Fix -Winconsistent-missing-override warnings. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1187463003. --- core/include/fxcrt/fx_basic.h | 45 +++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 21 deletions(-) (limited to 'core/include/fxcrt') diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index 35eacdfb0a..0083825bb0 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); -- cgit v1.2.3