diff options
author | truebrain <truebrain@openttd.org> | 2011-12-20 17:57:56 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-20 17:57:56 +0000 |
commit | 1c9bec19993417b1f3b240f2bdb0745aa26c0cb3 (patch) | |
tree | d09407cc962ee87ac1bbbbc60951cad74c6b1db7 /src/pathfinder/yapf/yapf_destrail.hpp | |
parent | 7a38642a1c83531a65907ae784bc03a82d35132a (diff) | |
download | openttd-1c9bec19993417b1f3b240f2bdb0745aa26c0cb3.tar.xz |
(svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC)
Diffstat (limited to 'src/pathfinder/yapf/yapf_destrail.hpp')
-rw-r--r-- | src/pathfinder/yapf/yapf_destrail.hpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pathfinder/yapf/yapf_destrail.hpp b/src/pathfinder/yapf/yapf_destrail.hpp index 45e425435..901e026d8 100644 --- a/src/pathfinder/yapf/yapf_destrail.hpp +++ b/src/pathfinder/yapf/yapf_destrail.hpp @@ -51,13 +51,13 @@ public: } /** Called by YAPF to detect if node ends in the desired destination */ - FORCEINLINE bool PfDetectDestination(Node& n) + inline bool PfDetectDestination(Node& n) { return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir()); } /** Called by YAPF to detect if node ends in the desired destination */ - FORCEINLINE bool PfDetectDestination(TileIndex tile, Trackdir td) + inline bool PfDetectDestination(TileIndex tile, Trackdir td) { bool bDest = IsRailDepotTile(tile); return bDest; @@ -67,7 +67,7 @@ public: * Called by YAPF to calculate cost estimate. Calculates distance to the destination * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */ - FORCEINLINE bool PfCalcEstimate(Node& n) + inline bool PfCalcEstimate(Node& n) { n.m_estimate = n.m_cost; return true; @@ -91,13 +91,13 @@ public: } /** Called by YAPF to detect if node ends in the desired destination */ - FORCEINLINE bool PfDetectDestination(Node& n) + inline bool PfDetectDestination(Node& n) { return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir()); } /** Called by YAPF to detect if node ends in the desired destination */ - FORCEINLINE bool PfDetectDestination(TileIndex tile, Trackdir td) + inline bool PfDetectDestination(TileIndex tile, Trackdir td) { return IsSafeWaitingPosition(Yapf().GetVehicle(), tile, td, true, !TrackFollower::Allow90degTurns()) && IsWaitingPositionFree(Yapf().GetVehicle(), tile, td, !TrackFollower::Allow90degTurns()); @@ -107,7 +107,7 @@ public: * Called by YAPF to calculate cost estimate. Calculates distance to the destination * adds it to the actual cost from origin and stores the sum to the Node::m_estimate. */ - FORCEINLINE bool PfCalcEstimate(Node& n) + inline bool PfCalcEstimate(Node& n) { n.m_estimate = n.m_cost; return true; @@ -164,13 +164,13 @@ public: } /** Called by YAPF to detect if node ends in the desired destination */ - FORCEINLINE bool PfDetectDestination(Node& n) + inline bool PfDetectDestination(Node& n) { return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir()); } /** Called by YAPF to detect if node ends in the desired destination */ - FORCEINLINE bool PfDetectDestination(TileIndex tile, Trackdir td) + inline bool PfDetectDestination(TileIndex tile, Trackdir td) { bool bDest; if (m_dest_station_id != INVALID_STATION) { @@ -188,7 +188,7 @@ public: * Called by YAPF to calculate cost estimate. Calculates distance to the destination * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */ - FORCEINLINE bool PfCalcEstimate(Node& n) + inline bool PfCalcEstimate(Node& n) { static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; static const int dg_dir_to_y_offs[] = {0, 1, 0, -1}; |