Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: xfa/fgas/crt/fgas_memory.cpp

Issue 1992033002: fgas/ code cleanup. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: xfa/fgas/crt/fgas_memory.cpp
diff --git a/xfa/fgas/crt/fgas_memory.cpp b/xfa/fgas/crt/fgas_memory.cpp
index 9176466a615bb0d5090ec8769e9cfd733d609a1b..d218f42aa418834329a285d311daf080f18a9e91 100644
--- a/xfa/fgas/crt/fgas_memory.cpp
+++ b/xfa/fgas/crt/fgas_memory.cpp
@@ -20,6 +20,7 @@ class CFX_DefStore : public IFX_MemoryAllocator, public CFX_Target {
public:
CFX_DefStore() {}
~CFX_DefStore() override {}
+
void* Alloc(size_t size) override { return FX_Alloc(uint8_t, size); }
void Free(void* pBlock) override { FX_Free(pBlock); }
};
@@ -44,12 +45,13 @@ struct FX_STATICSTORECHUNK {
class CFX_StaticStore : public IFX_MemoryAllocator, public CFX_Target {
public:
- CFX_StaticStore(size_t iDefChunkSize = 4096);
+ CFX_StaticStore(size_t iDefChunkSize);
~CFX_StaticStore() override;
+
void* Alloc(size_t size) override;
void Free(void* pBlock) override {}
- protected:
+ private:
size_t m_iAllocatedSize;
size_t m_iDefChunkSize;
FX_STATICSTORECHUNK* m_pChunk;
@@ -74,7 +76,7 @@ class CFX_FixedStore : public IFX_MemoryAllocator, public CFX_Target {
void* Alloc(size_t size) override;
void Free(void* pBlock) override;
- protected:
+ private:
FX_FIXEDSTORECHUNK* AllocChunk();
size_t m_iBlockSize;

Powered by Google App Engine
This is Rietveld 408576698