From b885d79f506bde93b4ab278b3f84b8ca6254f3b9 Mon Sep 17 00:00:00 2001 From: alberth Date: Sat, 8 Aug 2015 10:06:24 +0000 Subject: (svn r27362) -Codechange: Codestyle fixes for reference var declarations, static cast type, operator methods. --- src/pathfinder/yapf/yapf_costrail.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/pathfinder/yapf/yapf_costrail.hpp') 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(this); + return *static_cast(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) { -- cgit v1.2.3-54-g00ecf