summaryrefslogtreecommitdiff
path: root/core/include/fxcrt
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-03-12 13:33:31 -0700
committerTom Sepez <tsepez@chromium.org>2015-03-12 13:33:31 -0700
commit090d683489bfa3f36f1e2624c310ff9ca5836038 (patch)
tree578d69a3c8820f38ebf4392598df365890f9d893 /core/include/fxcrt
parent3c676ecee839e6b0a1e5c5d4b3524edcb0bd2a42 (diff)
downloadpdfium-090d683489bfa3f36f1e2624c310ff9ca5836038.tar.xz
Kill CFX_GrowOnlyPool.
It's unused, and when the time comes, we'll want to put pdfium onto a hardened allocator like partitionAlloc anyways. Along the way, merge adjacent #ifdef __cplusplus blocks, remove a pointless check for __cplusplus inside a .cpp file, and remove a redundant cast. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1008483002
Diffstat (limited to 'core/include/fxcrt')
-rw-r--r--core/include/fxcrt/fx_memory.h46
1 files changed, 2 insertions, 44 deletions
diff --git a/core/include/fxcrt/fx_memory.h b/core/include/fxcrt/fx_memory.h
index cb71c04fca..8806bba7dd 100644
--- a/core/include/fxcrt/fx_memory.h
+++ b/core/include/fxcrt/fx_memory.h
@@ -65,12 +65,9 @@ public:
}
void operator delete (void*, void*) {}
};
-#endif
-#ifdef __cplusplus
#if defined(_DEBUG)
#define FX_NEW new(__FILE__, __LINE__)
#else
-
#define FX_NEW new
#endif
#define FX_NEW_VECTOR(Pointer, Class, Count) \
@@ -91,44 +88,5 @@ public:
virtual ~CFX_DestructObject() {}
};
-class CFX_GrowOnlyPool : public CFX_Object
-{
-public:
-
- CFX_GrowOnlyPool(size_t trunk_size = 16384);
-
- ~CFX_GrowOnlyPool();
-
- void SetTrunkSize(size_t trunk_size)
- {
- m_TrunkSize = trunk_size;
- }
-
- void* AllocDebug(size_t size, FX_LPCSTR file, int line)
- {
- return Alloc(size);
- }
-
- void* Alloc(size_t size);
-
- void* ReallocDebug(void* p, size_t new_size, FX_LPCSTR file, int line)
- {
- return NULL;
- }
-
- void* Realloc(void* p, size_t new_size)
- {
- return NULL;
- }
-
- void Free(void*) {}
-
- void FreeAll();
-private:
-
- size_t m_TrunkSize;
-
- void* m_pFirstTrunk;
-};
-#endif
-#endif
+#endif // __cplusplus
+#endif // _FX_MEMORY_H_