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,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;
} }
} }

View File

@@ -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

View File

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