Unit test for vector

This commit is contained in:
2026-02-07 22:25:32 -05:00
parent 6f4fc75b66
commit 3edd23996e
11 changed files with 201 additions and 63 deletions

View File

@@ -10,6 +10,7 @@ namespace Juliet
template <typename Type>
struct VectorArena
{
public:
VectorArena()
: First(nullptr)
, Count(0)
@@ -39,12 +40,13 @@ namespace Juliet
Assert(index < Count);
Assert(Count > 0);
Type* baseAdr = First;
Type* elementAdr = First + index;
// Swap Last and element
Swap(Last, elementAdr);
--Last;
--Count;
ArenaPop(Arena, Stride);
}
void Clear()