summaryrefslogtreecommitdiff
path: root/src/pathfinder
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathfinder')
-rw-r--r--src/pathfinder/npf/npf.cpp7
-rw-r--r--src/pathfinder/yapf/yapf_destrail.hpp5
2 files changed, 5 insertions, 7 deletions
diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp
index 04213b405..d6ad43e4d 100644
--- a/src/pathfinder/npf/npf.cpp
+++ b/src/pathfinder/npf/npf.cpp
@@ -541,10 +541,9 @@ static int32 NPFFindSafeTile(AyStar *as, OpenListNode *current)
{
const Train *v = Train::From(((NPFFindStationOrTileData *)as->user_target)->v);
- return
- IsSafeWaitingPosition(v, current->path.node.tile, current->path.node.direction, true, _settings_game.pf.forbid_90_deg) &&
- IsWaitingPositionFree(v, current->path.node.tile, current->path.node.direction, _settings_game.pf.forbid_90_deg) ?
- AYSTAR_FOUND_END_NODE : AYSTAR_DONE;
+ return (IsSafeWaitingPosition(v, current->path.node.tile, current->path.node.direction, true, _settings_game.pf.forbid_90_deg) &&
+ IsWaitingPositionFree(v, current->path.node.tile, current->path.node.direction, _settings_game.pf.forbid_90_deg)) ?
+ AYSTAR_FOUND_END_NODE : AYSTAR_DONE;
}
/* Will find a station identified using the NPFFindStationOrTileData */
diff --git a/src/pathfinder/yapf/yapf_destrail.hpp b/src/pathfinder/yapf/yapf_destrail.hpp
index fa6ddfba3..605ee7a50 100644
--- a/src/pathfinder/yapf/yapf_destrail.hpp
+++ b/src/pathfinder/yapf/yapf_destrail.hpp
@@ -99,9 +99,8 @@ public:
/** Called by YAPF to detect if node ends in the desired destination */
FORCEINLINE bool PfDetectDestination(TileIndex tile, Trackdir td)
{
- return
- IsSafeWaitingPosition(Yapf().GetVehicle(), tile, td, true, !TrackFollower::Allow90degTurns()) &&
- IsWaitingPositionFree(Yapf().GetVehicle(), tile, td, !TrackFollower::Allow90degTurns());
+ return IsSafeWaitingPosition(Yapf().GetVehicle(), tile, td, true, !TrackFollower::Allow90degTurns()) &&
+ IsWaitingPositionFree(Yapf().GetVehicle(), tile, td, !TrackFollower::Allow90degTurns());
}
/**