diff options
Diffstat (limited to 'src/pathfinder')
-rw-r--r-- | src/pathfinder/yapf/yapf_road.cpp | 4 | ||||
-rw-r--r-- | src/pathfinder/yapf/yapf_ship.cpp | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/pathfinder/yapf/yapf_road.cpp b/src/pathfinder/yapf/yapf_road.cpp index 3122dd111..9e206115f 100644 --- a/src/pathfinder/yapf/yapf_road.cpp +++ b/src/pathfinder/yapf/yapf_road.cpp @@ -390,9 +390,7 @@ public: while (pNode->m_parent != nullptr) { steps--; if (pNode->GetIsChoice() && steps < YAPF_ROADVEH_PATH_CACHE_SEGMENTS) { - TrackdirByte td; - td = pNode->GetTrackdir(); - path_cache.td.push_front(td); + path_cache.td.push_front(pNode->GetTrackdir()); path_cache.tile.push_front(pNode->GetTile()); } pNode = pNode->m_parent; diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp index e7391d686..09a4fc76a 100644 --- a/src/pathfinder/yapf/yapf_ship.cpp +++ b/src/pathfinder/yapf/yapf_ship.cpp @@ -98,9 +98,7 @@ public: while (pNode->m_parent != nullptr) { steps--; if (steps > 0 && steps < YAPF_SHIP_PATH_CACHE_LENGTH) { - TrackdirByte td; - td = pNode->GetTrackdir(); - path_cache.push_front(td); + path_cache.push_front(pNode->GetTrackdir()); } pPrevNode = pNode; pNode = pNode->m_parent; |