From 8bf37f3dd7ff017eedaac427b9291a9335d61efc Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 14 Jun 2014 17:57:21 +0100 Subject: Fixed comments --- src/AllocationPool.h | 8 ++++---- src/ChunkData.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/AllocationPool.h b/src/AllocationPool.h index 643b44a6d..b8862e7df 100644 --- a/src/AllocationPool.h +++ b/src/AllocationPool.h @@ -3,7 +3,7 @@ #include -template +template class cAllocationPool { public: @@ -32,14 +32,14 @@ class cAllocationPool { T* Allocate() { - if (m_FreeList.size() <= BufferSize) + if (m_FreeList.size() <= NumElementsInReserve) { void * space = malloc(sizeof(T)); if (space != NULL) { return new(space) T; } - else if (m_FreeList.size() == BufferSize) + else if (m_FreeList.size() == NumElementsInReserve) { m_Callbacks->OnStartingUsingBuffer(); } @@ -64,7 +64,7 @@ class cAllocationPool { // placement destruct. ptr->~T(); m_FreeList.push_front(ptr); - if (m_FreeList.size() == BufferSize) + if (m_FreeList.size() == NumElementsInReserve) { m_Callbacks->OnStopUsingBuffer(); } diff --git a/src/ChunkData.cpp b/src/ChunkData.cpp index 24a2c3e14..a80b1de0f 100644 --- a/src/ChunkData.cpp +++ b/src/ChunkData.cpp @@ -30,9 +30,9 @@ template inline bool IsAllValue(const T * a_Array, size_t a_NumElem cChunkData::cChunkData(cAllocationPool& a_Pool) : #if __cplusplus < 201103L // auto_ptr style interface for memory management - m_IsOwner(true) + m_IsOwner(true), #endif -m_Pool(a_Pool) + m_Pool(a_Pool) { for (size_t i = 0; i < NumSections; i++) { -- cgit v1.2.3