diff options
author | alberth <alberth@openttd.org> | 2015-08-08 10:06:24 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2015-08-08 10:06:24 +0000 |
commit | b885d79f506bde93b4ab278b3f84b8ca6254f3b9 (patch) | |
tree | ed7e027c4444181baab5b4ef6b667cd179f29a65 /src/pathfinder/yapf/yapf_costrail.hpp | |
parent | 9cadc0e1504cf979c14e1cb42bfe51a29675dd81 (diff) | |
download | openttd-b885d79f506bde93b4ab278b3f84b8ca6254f3b9.tar.xz |
(svn r27362) -Codechange: Codestyle fixes for reference var declarations, static cast type, operator methods.
Diffstat (limited to 'src/pathfinder/yapf/yapf_costrail.hpp')
-rw-r--r-- | src/pathfinder/yapf/yapf_costrail.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp index c6080f2a1..80cbd529d 100644 --- a/src/pathfinder/yapf/yapf_costrail.hpp +++ b/src/pathfinder/yapf/yapf_costrail.hpp @@ -92,7 +92,7 @@ protected: /** to access inherited path finder */ Tpf& Yapf() { - return *static_cast<Tpf*>(this); + return *static_cast<Tpf *>(this); } public: @@ -130,7 +130,7 @@ public: } /** Return one tile cost (base cost + level crossing penalty). */ - inline int OneTileCost(TileIndex& tile, Trackdir trackdir) + inline int OneTileCost(TileIndex &tile, Trackdir trackdir) { int cost = 0; /* set base cost */ @@ -165,7 +165,7 @@ public: } /** The cost for reserved tiles, including skipped ones. */ - inline int ReservationCost(Node& n, TileIndex tile, Trackdir trackdir, int skipped) + inline int ReservationCost(Node &n, TileIndex tile, Trackdir trackdir, int skipped) { if (n.m_num_signals_passed >= m_sig_look_ahead_costs.Size() / 2) return 0; if (!IsPbsSignal(n.m_last_signal_type)) return 0; @@ -180,7 +180,7 @@ public: return 0; } - int SignalCost(Node& n, TileIndex tile, Trackdir trackdir) + int SignalCost(Node &n, TileIndex tile, Trackdir trackdir) { int cost = 0; /* if there is one-way signal in the opposite direction, then it is not our way */ @@ -614,14 +614,14 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th return true; } - inline bool CanUseGlobalCache(Node& n) const + inline bool CanUseGlobalCache(Node &n) const { return !m_disable_cache && (n.m_parent != NULL) && (n.m_parent->m_num_signals_passed >= m_sig_look_ahead_costs.Size()); } - inline void ConnectNodeToCachedData(Node& n, CachedData& ci) + inline void ConnectNodeToCachedData(Node &n, CachedData &ci) { n.m_segment = &ci; if (n.m_segment->m_cost < 0) { |