Rename ...New/...Free to ...Create/...Destroy

This commit is contained in:
2023-11-16 06:26:24 +01:00
parent 581da2b990
commit 9e6c836207
11 changed files with 34 additions and 34 deletions

View File

@@ -26,7 +26,7 @@ bool findPath(const PathfindingDesc *desc) {
bzMemSet(visited, 0, sizeof(visited));
PathNode *heap = desc->heap;
if (!heap) heap = bzHeapNew(PathNode, map->width * map->height);
if (!heap) heap = bzHeapCreate(PathNode, map->width * map->height);
else bzHeapClear(heap);
i32 toTargetCost = dst(desc->start, desc->target);
@@ -115,7 +115,7 @@ bool findPath(const PathfindingDesc *desc) {
}
if (!desc->heap) {
bzHeapFree(heap);
bzHeapDestroy(heap);
heap = NULL;
}