Panagiotis Christopoulos Charitos 3 vuotta sitten
vanhempi
sitoutus
9aff3edb80
2 muutettua tiedostoa jossa 6 lisäystä ja 8 poistoa
  1. 2 7
      AnKi/Util/CpuMemoryPools.cpp
  2. 4 1
      AnKi/Util/CpuMemoryPools.h

+ 2 - 7
AnKi/Util/CpuMemoryPools.cpp

@@ -163,19 +163,14 @@ void BaseMemoryPool::destroy()
 	m_allocationCount.setNonAtomically(0);
 	m_allocationCount.setNonAtomically(0);
 }
 }
 
 
-HeapMemoryPool::HeapMemoryPool()
-	: BaseMemoryPool(Type::kHeap)
+void HeapMemoryPool::init(AllocAlignedCallback allocCb, void* allocCbUserData, const Char* name)
 {
 {
+	BaseMemoryPool::init(allocCb, allocCbUserData, name);
 #if ANKI_MEM_EXTRA_CHECKS
 #if ANKI_MEM_EXTRA_CHECKS
 	m_signature = computePoolSignature(this);
 	m_signature = computePoolSignature(this);
 #endif
 #endif
 }
 }
 
 
-void HeapMemoryPool::init(AllocAlignedCallback allocCb, void* allocCbUserData, const Char* name)
-{
-	BaseMemoryPool::init(allocCb, allocCbUserData, name);
-}
-
 void HeapMemoryPool::destroy()
 void HeapMemoryPool::destroy()
 {
 {
 	const U32 count = m_allocationCount.load();
 	const U32 count = m_allocationCount.load();

+ 4 - 1
AnKi/Util/CpuMemoryPools.h

@@ -150,7 +150,10 @@ class HeapMemoryPool final : public BaseMemoryPool
 {
 {
 public:
 public:
 	/// Construct it.
 	/// Construct it.
-	HeapMemoryPool();
+	HeapMemoryPool()
+		: BaseMemoryPool(Type::kHeap)
+	{
+	}
 
 
 	/// @see init
 	/// @see init
 	HeapMemoryPool(AllocAlignedCallback allocCb, void* allocCbUserData, const Char* name = nullptr)
 	HeapMemoryPool(AllocAlignedCallback allocCb, void* allocCbUserData, const Char* name = nullptr)