From ca6ef58b1ee8521e4b940ee4883dee714960e413 Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Fri, 5 Feb 2016 23:45:45 +0200 Subject: Bulk clearing of whitespace --- src/AllocationPool.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/AllocationPool.h') diff --git a/src/AllocationPool.h b/src/AllocationPool.h index 4815ab414..799930708 100644 --- a/src/AllocationPool.h +++ b/src/AllocationPool.h @@ -15,23 +15,23 @@ public: { public: virtual ~cStarvationCallbacks() {} - + /** Is called when the reserve buffer starts to be used */ virtual void OnStartUsingReserve() = 0; - + /** Is called once the reserve buffer has returned to normal size */ virtual void OnEndUsingReserve() = 0; - + /** Is called when the allocation pool is unable to allocate memory. Will be repeatedly called if it does not free sufficient memory */ virtual void OnOutOfReserve() = 0; }; - + virtual ~cAllocationPool() {} - + /** Allocates a pointer to T */ virtual T * Allocate() = 0; - + /** Frees the pointer passed in a_ptr, invalidating it */ virtual void Free(T * a_ptr) = 0; }; @@ -47,7 +47,7 @@ class cListAllocationPool: public cAllocationPool { public: - + cListAllocationPool(std::unique_ptr::cStarvationCallbacks> a_Callbacks): m_Callbacks(std::move(a_Callbacks)) { @@ -62,7 +62,7 @@ public: m_FreeList.push_front(space); } } - + virtual ~cListAllocationPool() { @@ -72,7 +72,7 @@ public: m_FreeList.pop_front(); } } - + virtual T * Allocate() override { @@ -115,7 +115,7 @@ public: m_Callbacks->OnEndUsingReserve(); } } - + private: std::list m_FreeList; std::unique_ptr::cStarvationCallbacks> m_Callbacks; -- cgit v1.2.3