diff options
author | peter1138 <peter1138@openttd.org> | 2009-03-04 08:02:16 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2009-03-04 08:02:16 +0000 |
commit | f0de54bc10d158bbb1ae58b628c0896a56880540 (patch) | |
tree | c01ea5ac1459d5c07f3332f8887c8df85fe37e54 /src/yapf/yapf_costcache.hpp | |
parent | 0682c1c46cce7b74231486a0b8507e6e7a9b4128 (diff) | |
download | openttd-f0de54bc10d158bbb1ae58b628c0896a56880540.tar.xz |
(svn r15609) -Fix: Code style...
Diffstat (limited to 'src/yapf/yapf_costcache.hpp')
-rw-r--r-- | src/yapf/yapf_costcache.hpp | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/src/yapf/yapf_costcache.hpp b/src/yapf/yapf_costcache.hpp index 07679822b..92201da9b 100644 --- a/src/yapf/yapf_costcache.hpp +++ b/src/yapf/yapf_costcache.hpp @@ -23,13 +23,13 @@ public: FORCEINLINE bool PfNodeCacheFetch(Node& n) { return false; - }; + } /** Called by YAPF to flush the cached segment cost data back into cache storage. * Current cache implementation doesn't use that. */ FORCEINLINE void PfNodeCacheFlush(Node& n) { - }; + } }; @@ -52,7 +52,10 @@ protected: LocalCache m_local_cache; /// to access inherited path finder - FORCEINLINE Tpf& Yapf() {return *static_cast<Tpf*>(this);} + FORCEINLINE Tpf& Yapf() + { + return *static_cast<Tpf*>(this); + } public: /** Called by YAPF to attach cached or local segment cost data to the given node. @@ -62,13 +65,13 @@ public: CacheKey key(n.GetKey()); Yapf().ConnectNodeToCachedData(n, *new (&m_local_cache.AddNC()) CachedData(key)); return false; - }; + } /** Called by YAPF to flush the cached segment cost data back into cache storage. * Current cache implementation doesn't use that. */ FORCEINLINE void PfNodeCacheFlush(Node& n) { - }; + } }; @@ -81,7 +84,10 @@ struct CSegmentCostCacheBase { static int s_rail_change_counter; - static void NotifyTrackLayoutChange(TileIndex tile, Track track) {s_rail_change_counter++;} + static void NotifyTrackLayoutChange(TileIndex tile, Track track) + { + s_rail_change_counter++; + } }; @@ -109,7 +115,11 @@ struct CSegmentCostCacheT FORCEINLINE CSegmentCostCacheT() {} /** flush (clear) the cache */ - FORCEINLINE void Flush() {m_map.Clear(); m_heap.Clear();}; + FORCEINLINE void Flush() + { + m_map.Clear(); + m_heap.Clear(); + } FORCEINLINE Tsegment& Get(Key& key, bool *found) { @@ -148,7 +158,10 @@ protected: FORCEINLINE CYapfSegmentCostCacheGlobalT() : m_global_cache(stGetGlobalCache()) {}; /// to access inherited path finder - FORCEINLINE Tpf& Yapf() {return *static_cast<Tpf*>(this);} + FORCEINLINE Tpf& Yapf() + { + return *static_cast<Tpf*>(this); + } FORCEINLINE static Cache& stGetGlobalCache() { @@ -184,17 +197,13 @@ public: CachedData& item = m_global_cache.Get(key, &found); Yapf().ConnectNodeToCachedData(n, item); return found; - }; + } /** Called by YAPF to flush the cached segment cost data back into cache storage. * Current cache implementation doesn't use that. */ FORCEINLINE void PfNodeCacheFlush(Node& n) { - }; - + } }; - - - #endif /* YAPF_COSTCACHE_HPP */ |