Remove memory allocation in pathfinding

This commit is contained in:
2023-12-07 10:42:53 +01:00
parent 0d156f515e
commit 9800b5576e
6 changed files with 19 additions and 15 deletions

View File

@@ -21,7 +21,7 @@ void bzStackAllocDestroy(BzStackAlloc *alloc) {
}
void *bzStackAlloc(BzStackAlloc *alloc, size_t numBytes) {
BZ_ASSERT(alloc->size + numBytes < alloc->size);
BZ_ASSERT(alloc->allocated + numBytes < alloc->size);
void *allocated = (u8 *) alloc->memory + alloc->allocated;
alloc->allocated += numBytes;
return allocated;