Skip to content

Commit a242967

Browse files
Maullerxezon
authored andcommitted
refactor(pathfinder): Implement PathfindCellList class for the pathfindcell closedList (TheSuperHackers#2327)
1 parent 2aaf313 commit a242967

4 files changed

Lines changed: 135 additions & 139 deletions

File tree

Generals/Code/GameEngine/Include/GameLogic/AIPathfind.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,13 @@ class PathfindCell
332332
void removeFromOpenList( PathfindCellList &list );
333333

334334
/// put self on "closed" list, return new list
335-
PathfindCell *putOnClosedList( PathfindCell *list );
335+
void putOnClosedList( PathfindCellList &list );
336336

337337
/// remove self from "closed" list
338-
PathfindCell *removeFromClosedList( PathfindCell *list );
338+
void removeFromClosedList( PathfindCellList &list );
339339

340340
/// remove all cells from closed list.
341-
static Int releaseClosedList( PathfindCell *list );
341+
static Int releaseClosedList( PathfindCellList &list );
342342

343343
/// remove all cells from closed list.
344344
static Int releaseOpenList( PathfindCellList &list );
@@ -867,7 +867,7 @@ class Pathfinder : PathfindServicesInterface, public Snapshot
867867
IRegion2D m_logicalExtent; ///< Logical grid extent limits
868868

869869
PathfindCellList m_openList; ///< Cells ready to be explored
870-
PathfindCell *m_closedList; ///< Cells already explored
870+
PathfindCellList m_closedList; ///< Cells already explored
871871

872872
Bool m_isMapReady; ///< True if all cells of map have been classified
873873
Bool m_isTunneling; ///< True if path started in an obstacle

0 commit comments

Comments
 (0)