summaryrefslogtreecommitdiff
path: root/src/yapf/yapf_road.cpp
diff options
context:
space:
mode:
authorKUDr <KUDr@openttd.org>2007-04-20 19:13:35 +0000
committerKUDr <KUDr@openttd.org>2007-04-20 19:13:35 +0000
commit1a7fec1894b859be9384e51e9a568b833cf1fb47 (patch)
tree1cf8985a250a13d94e9c28c82417f667b75b70a6 /src/yapf/yapf_road.cpp
parent52daf7a2d3ff456fd57f9403896e4f612bb7becc (diff)
downloadopenttd-1a7fec1894b859be9384e51e9a568b833cf1fb47.tar.xz
(svn r9693) -Codechange [YAPF]: GetBestNode() now returns pointer to node instead of reference
Diffstat (limited to 'src/yapf/yapf_road.cpp')
-rw-r--r--src/yapf/yapf_road.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/yapf/yapf_road.cpp b/src/yapf/yapf_road.cpp
index c22683c25..ba7934c99 100644
--- a/src/yapf/yapf_road.cpp
+++ b/src/yapf/yapf_road.cpp
@@ -287,7 +287,7 @@ public:
// if path not found - return INVALID_TRACKDIR
Trackdir next_trackdir = INVALID_TRACKDIR;
- Node* pNode = &Yapf().GetBestNode();
+ Node *pNode = Yapf().GetBestNode();
if (pNode != NULL) {
// path was found or at least suggested
// walk through the path back to its origin
@@ -329,7 +329,7 @@ public:
// if path not found - return distance = UINT_MAX
uint dist = UINT_MAX;
- Node* pNode = &Yapf().GetBestNode();
+ Node *pNode = Yapf().GetBestNode();
if (pNode != NULL) {
// path was found or at least suggested
// get the path cost estimate
@@ -371,8 +371,8 @@ public:
// some path found
// get found depot tile
- Node& n = Yapf().GetBestNode();
- TileIndex depot_tile = n.m_segment_last_tile;
+ Node *n = Yapf().GetBestNode();
+ TileIndex depot_tile = n->m_segment_last_tile;
assert(IsTileDepotType(depot_tile, TRANSPORT_ROAD));
Depot* ret = GetDepotByTile(depot_tile);
return ret;