mirror of
https://github.com/ToyB-Chan/minimal-heap.git
synced 2026-07-13 21:51:16 +02:00
Update minimal_heap_implementation.inl
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
|
||||
bool MIHP_InitializeHeap(MIHP_Heap* heap, MIHP_HeapConfig config)
|
||||
{
|
||||
if (MIHP_IsHeapInitialized(heap))
|
||||
if (heap == NULL)
|
||||
return false;
|
||||
|
||||
if (heap == NULL)
|
||||
if (MIHP_IsHeapInitialized(heap))
|
||||
return false;
|
||||
|
||||
if (config.AllocationAlignment < sizeof(size_t))
|
||||
@@ -45,10 +45,10 @@ bool MIHP_IsHeapInitialized(const MIHP_Heap* heap)
|
||||
|
||||
bool MIHP_UninitializeHeap(MIHP_Heap* heap, bool force)
|
||||
{
|
||||
if (!MIHP_IsHeapInitialized(heap))
|
||||
if (heap == NULL)
|
||||
return false;
|
||||
|
||||
if (heap == NULL)
|
||||
if (!MIHP_IsHeapInitialized(heap))
|
||||
return false;
|
||||
|
||||
if (!force && heap->Stats.NumTotalOccupiedSegments > 0)
|
||||
|
||||
Reference in New Issue
Block a user