Rename ...New/...Free to ...Create/...Destroy
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user