2
0
Daniele Bartolini 10 жил өмнө
parent
commit
d3460f4256

+ 1 - 1
src/core/memory/linear_allocator.cpp

@@ -31,7 +31,7 @@ LinearAllocator::~LinearAllocator()
 	if (_backing)
 		_backing->deallocate(_physical_start);
 
-	CE_ASSERT(_offset == 0, "Memory leak of %ld bytes, maybe you forgot to call clear()?", _offset);
+	CE_ASSERT(_offset == 0, "Memory leak of %d bytes, maybe you forgot to call clear()?", _offset);
 }
 
 void* LinearAllocator::allocate(uint32_t size, uint32_t align)

+ 5 - 2
src/core/memory/memory.cpp

@@ -49,8 +49,11 @@ namespace memory
 
 		~HeapAllocator()
 		{
-			CE_ASSERT(_allocation_count == 0 && total_allocated() == 0,
-				"Missing %d deallocations causing a leak of %ld bytes", _allocation_count, total_allocated());
+			CE_ASSERT(_allocation_count == 0 && total_allocated() == 0
+				, "Missing %d deallocations causing a leak of %d bytes"
+				, _allocation_count
+				, total_allocated()
+				);
 		}
 
 		/// @copydoc Allocator::allocate()

+ 1 - 1
src/core/memory/stack_allocator.cpp

@@ -20,7 +20,7 @@ StackAllocator::StackAllocator(void* start, uint32_t size)
 StackAllocator::~StackAllocator()
 {
 	CE_ASSERT(_allocation_count == 0 && total_allocated() == 0,
-		"Missing %d deallocations causing a leak of %ld bytes", _allocation_count, total_allocated());
+		"Missing %d deallocations causing a leak of %d bytes", _allocation_count, total_allocated());
 }
 
 void* StackAllocator::allocate(uint32_t size, uint32_t align)