diff options
author | alberth <alberth@openttd.org> | 2011-02-25 21:53:43 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2011-02-25 21:53:43 +0000 |
commit | 1dbc0a20bed5cd85035b4f84a649c4f7386b07ab (patch) | |
tree | 2913d6359a374885441eeb51a67c6e0c7e0f08ef /src/pathfinder | |
parent | 87c8d97aca779cb227a4e015233cd266b63f2b79 (diff) | |
download | openttd-1dbc0a20bed5cd85035b4f84a649c4f7386b07ab.tar.xz |
(svn r22144) -Codechange: Unify 'while (true)' to 'for (;;)'
Diffstat (limited to 'src/pathfinder')
-rw-r--r-- | src/pathfinder/yapf/yapf_base.hpp | 2 | ||||
-rw-r--r-- | src/pathfinder/yapf/yapf_road.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pathfinder/yapf/yapf_base.hpp b/src/pathfinder/yapf/yapf_base.hpp index 42c73a170..b15d563b6 100644 --- a/src/pathfinder/yapf/yapf_base.hpp +++ b/src/pathfinder/yapf/yapf_base.hpp @@ -130,7 +130,7 @@ public: Yapf().PfSetStartupNodes(); bool bDestFound = true; - while (true) { + for (;;) { m_num_steps++; Node *n = m_nodes.GetBestOpenNode(); if (n == NULL) { diff --git a/src/pathfinder/yapf/yapf_road.cpp b/src/pathfinder/yapf/yapf_road.cpp index 9d0b65eec..c909e7e8a 100644 --- a/src/pathfinder/yapf/yapf_road.cpp +++ b/src/pathfinder/yapf/yapf_road.cpp @@ -107,7 +107,7 @@ public: /* start at n.m_key.m_tile / n.m_key.m_td and walk to the end of segment */ TileIndex tile = n.m_key.m_tile; Trackdir trackdir = n.m_key.m_td; - while (true) { + for (;;) { /* base tile cost depending on distance between edges */ segment_cost += Yapf().OneTileCost(tile, trackdir); |