Fix build error in release
This commit is contained in:
@@ -55,13 +55,16 @@ namespace Juliet
|
|||||||
{
|
{
|
||||||
Data = ArenaPushArray<Type>(Arena, newCapacity);
|
Data = ArenaPushArray<Type>(Arena, newCapacity);
|
||||||
}
|
}
|
||||||
else if (AllowRealloc && !InternalArena)
|
else if constexpr (AllowRealloc)
|
||||||
|
{
|
||||||
|
if (!InternalArena)
|
||||||
{
|
{
|
||||||
DataFirst = Data =
|
DataFirst = Data =
|
||||||
static_cast<Type*>(ArenaReallocate(Arena, Data, Capacity * sizeof(Type), newCapacity * sizeof(Type),
|
static_cast<Type*>(ArenaReallocate(Arena, Data, Capacity * sizeof(Type), newCapacity * sizeof(Type),
|
||||||
AlignOf(Type), true JULIET_DEBUG_ONLY(, "VectorRealloc")));
|
AlignOf(Type), true JULIET_DEBUG_ONLY(, "VectorRealloc")));
|
||||||
DataLast = Data + Count - 1;
|
DataLast = Data + Count - 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Capacity = newCapacity;
|
Capacity = newCapacity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <Core/Memory/MemoryArena.h>
|
|
||||||
#include <Juliet.h>
|
#include <Juliet.h>
|
||||||
|
|
||||||
|
#if JULIET_DEBUG
|
||||||
|
|
||||||
namespace Juliet::Debug
|
namespace Juliet::Debug
|
||||||
{
|
{
|
||||||
JULIET_API void DebugDrawMemoryArena();
|
JULIET_API void DebugDrawMemoryArena();
|
||||||
} // namespace Juliet::Debug
|
} // namespace Juliet::Debug
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -352,7 +352,9 @@ void JulietApplication::Update()
|
|||||||
|
|
||||||
if (ShowMemoryDebugger)
|
if (ShowMemoryDebugger)
|
||||||
{
|
{
|
||||||
|
#if JULIET_DEBUG
|
||||||
Debug::DebugDrawMemoryArena();
|
Debug::DebugDrawMemoryArena();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user