summaryrefslogtreecommitdiff
path: root/core/include/fxcrt/fx_basic.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-15 11:41:44 -0700
committerLei Zhang <thestig@chromium.org>2015-06-15 11:41:44 -0700
commit8bd09648445aef8a9ae38d9f61618bd2013ac3f0 (patch)
tree7ec93cc265e5b78ee2cc517be80fb7c2d156a768 /core/include/fxcrt/fx_basic.h
parent1972b16849fedfda675eacd5c8594b54dbd1264d (diff)
downloadpdfium-8bd09648445aef8a9ae38d9f61618bd2013ac3f0.tar.xz
Fix -Winconsistent-missing-override warnings.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1187463003.
Diffstat (limited to 'core/include/fxcrt/fx_basic.h')
-rw-r--r--core/include/fxcrt/fx_basic.h45
1 files changed, 24 insertions, 21 deletions
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);