summaryrefslogtreecommitdiff
path: root/pathfind.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-28 06:10:20 +0000
committertron <tron@openttd.org>2006-06-28 06:10:20 +0000
commit2b7089c637c2540948973e1eb5a4f05c1c33e142 (patch)
tree437dbb31ed36170ab24cef5c5a7bd68ca3c1c4dd /pathfind.c
parentbe0ec7bbf594bec1e88b50927298b4e9e24e9f2b (diff)
downloadopenttd-2b7089c637c2540948973e1eb5a4f05c1c33e142.tar.xz
(svn r5396) - Remove two fixed parameters
- Simplify an expresssion: c ? f(x) : f(y) -> f(c ? x : y)
Diffstat (limited to 'pathfind.c')
-rw-r--r--pathfind.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pathfind.c b/pathfind.c
index 3e2b3f31f..ae5f32ca6 100644
--- a/pathfind.c
+++ b/pathfind.c
@@ -756,7 +756,7 @@ start_at:
/* Check the rail type only if the train is *NOT* on top of a bridge. */
if (!(IsBridgeTile(tile) && IsBridgeMiddle(tile) && GetBridgeAxis(tile) == DiagDirToAxis(direction))) {
- if (IsTileType(tile, MP_STREET) ? !HASBIT(tpf->railtypes, GetRailTypeCrossing(tile)) : !HASBIT(tpf->railtypes, GetRailType(tile))) {
+ if (!HASBIT(tpf->railtypes, IsTileType(tile, MP_STREET) ? GetRailTypeCrossing(tile) : GetRailType(tile))) {
bits = 0;
break;
}