summaryrefslogtreecommitdiff
path: root/src/pathfinder
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2013-01-08 22:46:42 +0000
committerplanetmaker <planetmaker@openttd.org>2013-01-08 22:46:42 +0000
commitc24374f99c22d9420d6d182ff835f07a5b954b48 (patch)
tree7043ad53c941668339a0949867e10888f9e54f16 /src/pathfinder
parent89a2ba2a6d25e605c391e7343ba66090ee9f26de (diff)
downloadopenttd-c24374f99c22d9420d6d182ff835f07a5b954b48.tar.xz
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
Diffstat (limited to 'src/pathfinder')
-rw-r--r--src/pathfinder/npf/aystar.cpp2
-rw-r--r--src/pathfinder/npf/aystar.h2
-rw-r--r--src/pathfinder/npf/npf.cpp10
-rw-r--r--src/pathfinder/npf/queue.cpp6
-rw-r--r--src/pathfinder/pathfinder_type.h4
-rw-r--r--src/pathfinder/yapf/yapf_base.hpp4
-rw-r--r--src/pathfinder/yapf/yapf_costbase.hpp2
7 files changed, 15 insertions, 15 deletions
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;
}
}
diff --git a/src/pathfinder/pathfinder_type.h b/src/pathfinder/pathfinder_type.h
index cee1fd3f6..9f5a42d76 100644
--- a/src/pathfinder/pathfinder_type.h
+++ b/src/pathfinder/pathfinder_type.h
@@ -18,7 +18,7 @@
static const int NPF_TILE_LENGTH = 100;
/**
- * This penalty is the equivalent of "infite", which means that paths that
+ * This penalty is the equivalent of "infinite", which means that paths that
* get this penalty will be chosen, but only if there is no other route
* without it. Be careful with not applying this penalty to often, or the
* total path cost might overflow..
@@ -33,7 +33,7 @@ static const int YAPF_TILE_LENGTH = 100;
static const int YAPF_TILE_CORNER_LENGTH = 71;
/**
- * This penalty is the equivalent of "infite", which means that paths that
+ * This penalty is the equivalent of "infinite", which means that paths that
* get this penalty will be chosen, but only if there is no other route
* without it. Be careful with not applying this penalty to often, or the
* total path cost might overflow..
diff --git a/src/pathfinder/yapf/yapf_base.hpp b/src/pathfinder/yapf/yapf_base.hpp
index 4702c9451..f63dcf04a 100644
--- a/src/pathfinder/yapf/yapf_base.hpp
+++ b/src/pathfinder/yapf/yapf_base.hpp
@@ -34,8 +34,8 @@ extern int _total_pf_time_us;
* you need to declare only your node type. Look at test_yapf.h for an example.
*
*
- * Requrements to your pathfinder class derived from CYapfBaseT:
- * -------------------------------------------------------------
+ * Requirements to your pathfinder class derived from CYapfBaseT:
+ * --------------------------------------------------------------
* Your pathfinder derived class needs to implement following methods:
* inline void PfSetStartupNodes()
* inline void PfFollowNode(Node& org)
diff --git a/src/pathfinder/yapf/yapf_costbase.hpp b/src/pathfinder/yapf/yapf_costbase.hpp
index 316d1476c..6b55585a8 100644
--- a/src/pathfinder/yapf/yapf_costbase.hpp
+++ b/src/pathfinder/yapf/yapf_costbase.hpp
@@ -15,7 +15,7 @@
/** Base implementation for cost accounting. */
struct CYapfCostBase {
/**
- * Does the given track direction on the given tile yeild an uphill penalty?
+ * Does the given track direction on the given tile yield an uphill penalty?
* @param tile The tile to check.
* @param td The track direction to check.
* @return True if there's a slope, otherwise false.