Fix build error in release

This commit is contained in:
2026-02-14 18:12:19 -05:00
parent 5a22a172a6
commit dfd7279e84
3 changed files with 14 additions and 6 deletions

View File

@@ -55,12 +55,15 @@ namespace Juliet
{
Data = ArenaPushArray<Type>(Arena, newCapacity);
}
else if (AllowRealloc && !InternalArena)
else if constexpr (AllowRealloc)
{
DataFirst = Data =
static_cast<Type*>(ArenaReallocate(Arena, Data, Capacity * sizeof(Type), newCapacity * sizeof(Type),
AlignOf(Type), true JULIET_DEBUG_ONLY(, "VectorRealloc")));
DataLast = Data + Count - 1;
if (!InternalArena)
{
DataFirst = Data =
static_cast<Type*>(ArenaReallocate(Arena, Data, Capacity * sizeof(Type), newCapacity * sizeof(Type),
AlignOf(Type), true JULIET_DEBUG_ONLY(, "VectorRealloc")));
DataLast = Data + Count - 1;
}
}
Capacity = newCapacity;
}

View File

@@ -1,9 +1,12 @@
#pragma once
#include <Core/Memory/MemoryArena.h>
#include <Juliet.h>
#if JULIET_DEBUG
namespace Juliet::Debug
{
JULIET_API void DebugDrawMemoryArena();
} // namespace Juliet::Debug
#endif

View File

@@ -352,7 +352,9 @@ void JulietApplication::Update()
if (ShowMemoryDebugger)
{
#if JULIET_DEBUG
Debug::DebugDrawMemoryArena();
#endif
}
}