summaryrefslogtreecommitdiff
path: root/src/pathfinder/yapf/yapf_ship.cpp
diff options
context:
space:
mode:
authorJ0anJosep <juanjo.ng.83@gmail.com>2018-05-12 18:19:40 +0200
committerfrosch <github@elsenhans.name>2018-06-27 23:14:30 +0200
commitd01c09fb73aacd1b3c204829e7c574bbde09153f (patch)
tree5327845c01eeba8864925a38d97ab210b58f1850 /src/pathfinder/yapf/yapf_ship.cpp
parent31ac11bddb71945bba57d0cefac620f455963455 (diff)
downloadopenttd-d01c09fb73aacd1b3c204829e7c574bbde09153f.tar.xz
Codechange: Use HasTrack(dir) to improve code readability.
Diffstat (limited to 'src/pathfinder/yapf/yapf_ship.cpp')
-rw-r--r--src/pathfinder/yapf/yapf_ship.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp
index df6cd468c..44a5c0cfa 100644
--- a/src/pathfinder/yapf/yapf_ship.cpp
+++ b/src/pathfinder/yapf/yapf_ship.cpp
@@ -65,7 +65,7 @@ public:
/* use vehicle's current direction if that's possible, otherwise use first usable one. */
Trackdir veh_dir = v->GetVehicleTrackdir();
- return ((trackdirs & TrackdirToTrackdirBits(veh_dir)) != 0) ? veh_dir : (Trackdir)FindFirstBit2x64(trackdirs);
+ return (HasTrackdir(trackdirs, veh_dir)) ? veh_dir : (Trackdir)FindFirstBit2x64(trackdirs);
}
/* move back to the old tile/trackdir (where ship is coming from) */