From c24374f99c22d9420d6d182ff835f07a5b954b48 Mon Sep 17 00:00:00 2001 From: planetmaker Date: Tue, 8 Jan 2013 22:46:42 +0000 Subject: (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) --- src/pathfinder/npf/aystar.cpp | 2 +- src/pathfinder/npf/aystar.h | 2 +- src/pathfinder/npf/npf.cpp | 10 +++++----- src/pathfinder/npf/queue.cpp | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/pathfinder/npf') diff --git a/src/pathfinder/npf/aystar.cpp b/src/pathfinder/npf/aystar.cpp index 64a1735e4..153ffa8c1 100644 --- a/src/pathfinder/npf/aystar.cpp +++ b/src/pathfinder/npf/aystar.cpp @@ -124,7 +124,7 @@ void AyStar::CheckTile(AyStarNode *current, OpenListNode *parent) /* The f-value if g + h */ new_f = new_g + new_h; - /* Get the pointer to the parent in the ClosedList (the currentone is to a copy of the one in the OpenList) */ + /* Get the pointer to the parent in the ClosedList (the current one is to a copy of the one in the OpenList) */ closedlist_parent = this->ClosedListIsInList(&parent->path.node); /* Check if this item is already in the OpenList */ diff --git a/src/pathfinder/npf/aystar.h b/src/pathfinder/npf/aystar.h index 6865626eb..f9dd1a4ff 100644 --- a/src/pathfinder/npf/aystar.h +++ b/src/pathfinder/npf/aystar.h @@ -64,7 +64,7 @@ struct AyStar; /** * Check whether the end-tile is found. * @param aystar %AyStar search algorithm data. - * @param current Node to examone. + * @param current Node to exam one. * @note The 2nd parameter should be #OpenListNode, and \em not #AyStarNode. #AyStarNode is * part of #OpenListNode and so it could be accessed without any problems. * The good part about #OpenListNode is, and how AIs use it, that you can diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp index 1b8d2f17f..5c4ccb3cc 100644 --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -100,7 +100,7 @@ static inline void NPFSetFlag(AyStarNode *node, NPFNodeFlag flag, bool value) } /** - * Calculates the minimum distance traveled to get from t0 to t1 when only + * Calculates the minimum distance travelled to get from t0 to t1 when only * using tracks (ie, only making 45 degree turns). Returns the distance in the * NPF scale, ie the number of full tiles multiplied by NPF_TILE_LENGTH to * prevent rounding. @@ -145,7 +145,7 @@ static int32 NPFCalcZero(AyStar *as, AyStarNode *current, OpenListNode *parent) return 0; } -/* Calcs the heuristic to the target station or tile. For train stations, it +/* Calculates the heuristic to the target station or tile. For train stations, it * takes into account the direction of approach. */ static int32 NPFCalcStationOrTileHeuristic(AyStar *as, AyStarNode *current, OpenListNode *parent) @@ -245,7 +245,7 @@ static uint NPFSlopeCost(AyStarNode *current) } return 0; /* Should we give a bonus for slope down? Probably not, we - * could just substract that bonus from the penalty, because + * could just subtract that bonus from the penalty, because * there is only one level of steepness... */ } @@ -569,7 +569,7 @@ static int32 NPFFindStationOrTile(AyStar *as, OpenListNode *current) * Find the node containing the first signal on the path. * * If the first signal is on the very first two tiles of the path, - * the second signal is returnd. If no suitable signal is present, the + * the second signal is returned. If no suitable signal is present, the * last node of the path is returned. */ static const PathNode *FindSafePosition(PathNode *path, const Train *v) @@ -1052,7 +1052,7 @@ static NPFFoundTargetData NPFRouteToStationOrTile(TileIndex tile, Trackdir track /* Search using breadth first. Good for little track choice and inaccurate * heuristic, such as railway/road with two start nodes, the second being the reverse. Call * NPFGetFlag(result.node, NPF_FLAG_REVERSE) to see from which node the path - * orginated. All pathfs from the second node will have the given + * originated. All paths from the second node will have the given * reverse_penalty applied (NPF_TILE_LENGTH is the equivalent of one full * tile). */ diff --git a/src/pathfinder/npf/queue.cpp b/src/pathfinder/npf/queue.cpp index f964ece24..45540c1b6 100644 --- a/src/pathfinder/npf/queue.cpp +++ b/src/pathfinder/npf/queue.cpp @@ -158,7 +158,7 @@ bool BinaryHeap::Delete(void *item, int priority) for (;;) { j = i; - /* Check if we have 2 childs */ + /* Check if we have 2 children */ if (2 * j + 1 <= this->size) { /* Is this child smaller than the parent? */ if (this->GetElement(j).priority >= this->GetElement(2 * j).priority) i = 2 * j; @@ -170,13 +170,13 @@ bool BinaryHeap::Delete(void *item, int priority) if (this->GetElement(j).priority >= this->GetElement(2 * j).priority) i = 2 * j; } - /* One of our childs is smaller than we are, switch */ + /* One of our children is smaller than we are, switch */ if (i != j) { temp = this->GetElement(j); this->GetElement(j) = this->GetElement(i); this->GetElement(i) = temp; } else { - /* None of our childs is smaller, so we stay here.. stop :) */ + /* None of our children is smaller, so we stay here.. stop :) */ break; } } -- cgit v1.2.3-54-g00ecf