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_node.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_node.hpp')
-rw-r--r-- | src/pathfinder/yapf/yapf_node.hpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/pathfinder/yapf/yapf_node.hpp b/src/pathfinder/yapf/yapf_node.hpp index 0eb9802de..39f393381 100644 --- a/src/pathfinder/yapf/yapf_node.hpp +++ b/src/pathfinder/yapf/yapf_node.hpp @@ -18,15 +18,15 @@ struct CYapfNodeKeyExitDir { Trackdir m_td; DiagDirection m_exitdir; - FORCEINLINE void Set(TileIndex tile, Trackdir td) + inline void Set(TileIndex tile, Trackdir td) { m_tile = tile; m_td = td; m_exitdir = (m_td == INVALID_TRACKDIR) ? INVALID_DIAGDIR : TrackdirToExitdir(m_td); } - FORCEINLINE int CalcHash() const {return m_exitdir | (m_tile << 2);} - FORCEINLINE bool operator == (const CYapfNodeKeyExitDir& other) const {return (m_tile == other.m_tile) && (m_exitdir == other.m_exitdir);} + inline int CalcHash() const {return m_exitdir | (m_tile << 2);} + inline bool operator == (const CYapfNodeKeyExitDir& other) const {return (m_tile == other.m_tile) && (m_exitdir == other.m_exitdir);} void Dump(DumpTarget &dmp) const { @@ -38,8 +38,8 @@ struct CYapfNodeKeyExitDir { struct CYapfNodeKeyTrackDir : public CYapfNodeKeyExitDir { - FORCEINLINE int CalcHash() const {return m_td | (m_tile << 4);} - FORCEINLINE bool operator == (const CYapfNodeKeyTrackDir& other) const {return (m_tile == other.m_tile) && (m_td == other.m_td);} + inline int CalcHash() const {return m_td | (m_tile << 4);} + inline bool operator == (const CYapfNodeKeyTrackDir& other) const {return (m_tile == other.m_tile) && (m_td == other.m_td);} }; /** Yapf Node base */ @@ -54,7 +54,7 @@ struct CYapfNodeT { int m_cost; int m_estimate; - FORCEINLINE void Set(Node *parent, TileIndex tile, Trackdir td, bool is_choice) + inline void Set(Node *parent, TileIndex tile, Trackdir td, bool is_choice) { m_key.Set(tile, td); m_hash_next = NULL; @@ -63,14 +63,14 @@ struct CYapfNodeT { m_estimate = 0; } - FORCEINLINE Node *GetHashNext() {return m_hash_next;} - FORCEINLINE void SetHashNext(Node *pNext) {m_hash_next = pNext;} - FORCEINLINE TileIndex GetTile() const {return m_key.m_tile;} - FORCEINLINE Trackdir GetTrackdir() const {return m_key.m_td;} - FORCEINLINE const Tkey_& GetKey() const {return m_key;} - FORCEINLINE int GetCost() const {return m_cost;} - FORCEINLINE int GetCostEstimate() const {return m_estimate;} - FORCEINLINE bool operator < (const Node& other) const {return m_estimate < other.m_estimate;} + inline Node *GetHashNext() {return m_hash_next;} + inline void SetHashNext(Node *pNext) {m_hash_next = pNext;} + inline TileIndex GetTile() const {return m_key.m_tile;} + inline Trackdir GetTrackdir() const {return m_key.m_td;} + inline const Tkey_& GetKey() const {return m_key;} + inline int GetCost() const {return m_cost;} + inline int GetCostEstimate() const {return m_estimate;} + inline bool operator < (const Node& other) const {return m_estimate < other.m_estimate;} void Dump(DumpTarget &dmp) const { |