summaryrefslogtreecommitdiff
path: root/src/pathfinder/npf
diff options
context:
space:
mode:
authorRubidium <rubidium@openttd.org>2021-06-16 23:21:21 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-06-17 16:18:30 +0200
commit281a65b3e17310d07458652a3f6cba55aff59dc0 (patch)
treee3f06df00a9f8fc074f863b230980f2a11b066e4 /src/pathfinder/npf
parent357af686dc5e0a0085da5c42639abe83caebe6c3 (diff)
downloadopenttd-281a65b3e17310d07458652a3f6cba55aff59dc0.tar.xz
Cleanup: simplify some boolean expressions
Diffstat (limited to 'src/pathfinder/npf')
-rw-r--r--src/pathfinder/npf/npf.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp
index 733b2eba9..588718185 100644
--- a/src/pathfinder/npf/npf.cpp
+++ b/src/pathfinder/npf/npf.cpp
@@ -826,9 +826,7 @@ static bool CanEnterTile(TileIndex tile, DiagDirection dir, AyStarUserData *user
/* Depots, standard roadstops and single tram bits can only be entered from one direction */
DiagDirection single_entry = GetTileSingleEntry(tile, user->type, user->subtype);
- if (single_entry != INVALID_DIAGDIR && single_entry != ReverseDiagDir(dir)) return false;
-
- return true;
+ return single_entry == INVALID_DIAGDIR || single_entry == ReverseDiagDir(dir);
}
/**