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_rail.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_rail.hpp')
-rw-r--r-- | src/pathfinder/yapf/yapf_node_rail.hpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/pathfinder/yapf/yapf_node_rail.hpp b/src/pathfinder/yapf/yapf_node_rail.hpp index 275133bd8..765fa0daf 100644 --- a/src/pathfinder/yapf/yapf_node_rail.hpp +++ b/src/pathfinder/yapf/yapf_node_rail.hpp @@ -17,39 +17,39 @@ struct CYapfRailSegmentKey { uint32 m_value; - FORCEINLINE CYapfRailSegmentKey(const CYapfRailSegmentKey& src) : m_value(src.m_value) {} + inline CYapfRailSegmentKey(const CYapfRailSegmentKey& src) : m_value(src.m_value) {} - FORCEINLINE CYapfRailSegmentKey(const CYapfNodeKeyTrackDir& node_key) + inline CYapfRailSegmentKey(const CYapfNodeKeyTrackDir& node_key) { Set(node_key); } - FORCEINLINE void Set(const CYapfRailSegmentKey& src) + inline void Set(const CYapfRailSegmentKey& src) { m_value = src.m_value; } - FORCEINLINE void Set(const CYapfNodeKeyTrackDir& node_key) + inline void Set(const CYapfNodeKeyTrackDir& node_key) { m_value = (((int)node_key.m_tile) << 4) | node_key.m_td; } - FORCEINLINE int32 CalcHash() const + inline int32 CalcHash() const { return m_value; } - FORCEINLINE TileIndex GetTile() const + inline TileIndex GetTile() const { return (TileIndex)(m_value >> 4); } - FORCEINLINE Trackdir GetTrackdir() const + inline Trackdir GetTrackdir() const { return (Trackdir)(m_value & 0x0F); } - FORCEINLINE bool operator == (const CYapfRailSegmentKey& other) const + inline bool operator == (const CYapfRailSegmentKey& other) const { return m_value == other.m_value; } @@ -144,7 +144,7 @@ struct CYapfRailSegment EndSegmentReasonBits m_end_segment_reason; CYapfRailSegment *m_hash_next; - FORCEINLINE CYapfRailSegment(const CYapfRailSegmentKey& key) + inline CYapfRailSegment(const CYapfRailSegmentKey& key) : m_key(key) , m_last_tile(INVALID_TILE) , m_last_td(INVALID_TRACKDIR) @@ -155,22 +155,22 @@ struct CYapfRailSegment , m_hash_next(NULL) {} - FORCEINLINE const Key& GetKey() const + inline const Key& GetKey() const { return m_key; } - FORCEINLINE TileIndex GetTile() const + inline TileIndex GetTile() const { return m_key.GetTile(); } - FORCEINLINE CYapfRailSegment *GetHashNext() + inline CYapfRailSegment *GetHashNext() { return m_hash_next; } - FORCEINLINE void SetHashNext(CYapfRailSegment *next) + inline void SetHashNext(CYapfRailSegment *next) { m_hash_next = next; } @@ -208,7 +208,7 @@ struct CYapfRailNodeT SignalType m_last_red_signal_type; SignalType m_last_signal_type; - FORCEINLINE void Set(CYapfRailNodeT *parent, TileIndex tile, Trackdir td, bool is_choice) + inline void Set(CYapfRailNodeT *parent, TileIndex tile, Trackdir td, bool is_choice) { base::Set(parent, tile, td, is_choice); m_segment = NULL; @@ -236,19 +236,19 @@ struct CYapfRailNodeT flags_u.flags_s.m_choice_seen |= is_choice; } - FORCEINLINE TileIndex GetLastTile() const + inline TileIndex GetLastTile() const { assert(m_segment != NULL); return m_segment->m_last_tile; } - FORCEINLINE Trackdir GetLastTrackdir() const + inline Trackdir GetLastTrackdir() const { assert(m_segment != NULL); return m_segment->m_last_td; } - FORCEINLINE void SetLastTileTrackdir(TileIndex tile, Trackdir td) + inline void SetLastTileTrackdir(TileIndex tile, Trackdir td) { assert(m_segment != NULL); m_segment->m_last_tile = tile; |