summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/extension.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcrt/extension.h')
-rw-r--r--core/src/fxcrt/extension.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index 808c247e8a..a23eab5c58 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -104,23 +104,23 @@ class CFX_MemoryStream final : public IFX_MemoryStream {
}
m_Blocks.RemoveAll();
}
- virtual IFX_FileStream* Retain() override {
+
+ // IFX_MemoryStream:
+ IFX_FileStream* Retain() override {
m_dwCount++;
return this;
}
- virtual void Release() override {
+ void Release() override {
FX_DWORD nCount = --m_dwCount;
if (nCount) {
return;
}
delete this;
}
- virtual FX_FILESIZE GetSize() override { return (FX_FILESIZE)m_nCurSize; }
- virtual FX_BOOL IsEOF() override { return m_nCurPos >= (size_t)GetSize(); }
- virtual FX_FILESIZE GetPosition() override { return (FX_FILESIZE)m_nCurPos; }
- virtual FX_BOOL ReadBlock(void* buffer,
- FX_FILESIZE offset,
- size_t size) override {
+ FX_FILESIZE GetSize() override { return (FX_FILESIZE)m_nCurSize; }
+ FX_BOOL IsEOF() override { return m_nCurPos >= (size_t)GetSize(); }
+ FX_FILESIZE GetPosition() override { return (FX_FILESIZE)m_nCurPos; }
+ FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override {
if (!buffer || !size) {
return FALSE;
}
@@ -153,7 +153,7 @@ class CFX_MemoryStream final : public IFX_MemoryStream {
}
return TRUE;
}
- virtual size_t ReadBlock(void* buffer, size_t size) override {
+ size_t ReadBlock(void* buffer, size_t size) override {
if (m_nCurPos >= m_nCurSize) {
return 0;
}
@@ -163,9 +163,9 @@ class CFX_MemoryStream final : public IFX_MemoryStream {
}
return nRead;
}
- virtual FX_BOOL WriteBlock(const void* buffer,
- FX_FILESIZE offset,
- size_t size) override {
+ FX_BOOL WriteBlock(const void* buffer,
+ FX_FILESIZE offset,
+ size_t size) override {
if (!buffer || !size) {
return FALSE;
}
@@ -223,11 +223,11 @@ class CFX_MemoryStream final : public IFX_MemoryStream {
}
return TRUE;
}
- virtual FX_BOOL Flush() override { return TRUE; }
- virtual FX_BOOL IsConsecutive() const override {
+ FX_BOOL Flush() override { return TRUE; }
+ FX_BOOL IsConsecutive() const override {
return m_dwFlags & FX_MEMSTREAM_Consecutive;
}
- virtual void EstimateSize(size_t nInitSize, size_t nGrowSize) override {
+ void EstimateSize(size_t nInitSize, size_t nGrowSize) override {
if (m_dwFlags & FX_MEMSTREAM_Consecutive) {
if (m_Blocks.GetSize() < 1) {
uint8_t* pBlock = FX_Alloc(uint8_t, FX_MAX(nInitSize, 4096));
@@ -238,12 +238,12 @@ class CFX_MemoryStream final : public IFX_MemoryStream {
m_nGrowSize = FX_MAX(nGrowSize, 4096);
}
}
- virtual uint8_t* GetBuffer() const override {
+ uint8_t* GetBuffer() const override {
return m_Blocks.GetSize() ? (uint8_t*)m_Blocks[0] : NULL;
}
- virtual void AttachBuffer(uint8_t* pBuffer,
- size_t nSize,
- FX_BOOL bTakeOver = FALSE) override {
+ void AttachBuffer(uint8_t* pBuffer,
+ size_t nSize,
+ FX_BOOL bTakeOver = FALSE) override {
if (!(m_dwFlags & FX_MEMSTREAM_Consecutive)) {
return;
}
@@ -254,7 +254,7 @@ class CFX_MemoryStream final : public IFX_MemoryStream {
m_dwFlags =
FX_MEMSTREAM_Consecutive | (bTakeOver ? FX_MEMSTREAM_TakeOver : 0);
}
- virtual void DetachBuffer() override {
+ void DetachBuffer() override {
if (!(m_dwFlags & FX_MEMSTREAM_Consecutive)) {
return;
}