(svn r27362) -Codechange: Codestyle fixes for reference var declarations, static cast type, operator methods.

This commit is contained in:
alberth
2015-08-08 10:06:24 +00:00
parent 9cadc0e150
commit b885d79f50
17 changed files with 135 additions and 135 deletions

View File

@@ -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) {