summaryrefslogtreecommitdiff
path: root/src/pathfinder/yapf/yapf_costrail.hpp
diff options
context:
space:
mode:
authorJ0anJosep <juanjo.ng.83@gmail.com>2018-04-29 12:23:01 +0200
committerfrosch <github@elsenhans.name>2018-06-27 23:14:30 +0200
commit31ac11bddb71945bba57d0cefac620f455963455 (patch)
tree6cd92f96ed2dd0ab601c961723aade3a6f18c4a5 /src/pathfinder/yapf/yapf_costrail.hpp
parent85ebe20a761127bebe873389d81f31502685a98a (diff)
downloadopenttd-31ac11bddb71945bba57d0cefac620f455963455.tar.xz
Codechange: Increase readability of track functions and pathfinders.
Diffstat (limited to 'src/pathfinder/yapf/yapf_costrail.hpp')
-rw-r--r--src/pathfinder/yapf/yapf_costrail.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp
index ca317f09a..5c5a7fbaf 100644
--- a/src/pathfinder/yapf/yapf_costrail.hpp
+++ b/src/pathfinder/yapf/yapf_costrail.hpp
@@ -104,7 +104,7 @@ public:
assert(IsValidTrackdir(td2));
int cost = 0;
if (TrackFollower::Allow90degTurns()
- && ((TrackdirToTrackdirBits(td2) & (TrackdirBits)TrackdirCrossesTrackdirs(td1)) != 0)) {
+ && ((TrackdirToTrackdirBits(td2) & TrackdirCrossesTrackdirs(td1)) != TRACKDIR_BIT_NONE)) {
/* 90-deg curve penalty */
cost += Yapf().PfGetSettings().rail_curve90_penalty;
} else if (td2 != NextTrackdir(td1)) {