Codechange: coding style fixes
This commit is contained in:
@@ -116,7 +116,7 @@ public:
|
||||
}
|
||||
|
||||
/** remove and return the open node specified by a key */
|
||||
inline Titem_& PopOpenNode(const Key &key)
|
||||
inline Titem_ &PopOpenNode(const Key &key)
|
||||
{
|
||||
Titem_ &item = m_open.Pop(key);
|
||||
uint idxPop = m_open_queue.FindIndex(item);
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
}
|
||||
|
||||
/** Get a particular item. */
|
||||
inline Titem_& ItemAt(int idx)
|
||||
inline Titem_ &ItemAt(int idx)
|
||||
{
|
||||
return m_arr[idx];
|
||||
}
|
||||
|
@@ -87,14 +87,14 @@ public:
|
||||
|
||||
protected:
|
||||
/** to access inherited path finder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
|
||||
public:
|
||||
/** return current settings (can be custom - company based - but later) */
|
||||
inline const YAPFSettings& PfGetSettings() const
|
||||
inline const YAPFSettings &PfGetSettings() const
|
||||
{
|
||||
return *m_settings;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
* Calls NodeList::CreateNewNode() - allocates new node that can be filled and used
|
||||
* as argument for AddStartupNode() or AddNewNode()
|
||||
*/
|
||||
inline Node& CreateNewNode()
|
||||
inline Node &CreateNewNode()
|
||||
{
|
||||
Node &node = *m_nodes.CreateNewNode();
|
||||
return node;
|
||||
|
@@ -24,7 +24,7 @@ protected:
|
||||
TrackdirBits m_orgTrackdirs; ///< origin trackdir mask
|
||||
|
||||
/** to access inherited path finder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -68,7 +68,7 @@ protected:
|
||||
bool m_treat_first_red_two_way_signal_as_eol; ///< in some cases (leaving station) we need to handle first two-way signal differently
|
||||
|
||||
/** to access inherited path finder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
|
||||
protected:
|
||||
/** to access inherited path finder */
|
||||
Tpf& Yapf()
|
||||
Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@ protected:
|
||||
LocalCache m_local_cache;
|
||||
|
||||
/** to access inherited path finder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -138,7 +138,7 @@ struct CSegmentCostCacheT : public CSegmentCostCacheBase {
|
||||
m_heap.Clear();
|
||||
}
|
||||
|
||||
inline Tsegment& Get(Key &key, bool *found)
|
||||
inline Tsegment &Get(Key &key, bool *found)
|
||||
{
|
||||
Tsegment *item = m_map.Find(key);
|
||||
if (item == nullptr) {
|
||||
@@ -174,12 +174,12 @@ protected:
|
||||
inline CYapfSegmentCostCacheGlobalT() : m_global_cache(stGetGlobalCache()) {};
|
||||
|
||||
/** to access inherited path finder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
|
||||
inline static Cache& stGetGlobalCache()
|
||||
inline static Cache &stGetGlobalCache()
|
||||
{
|
||||
static int last_rail_change_counter = 0;
|
||||
static Cache C;
|
||||
|
@@ -77,7 +77,7 @@ protected:
|
||||
}
|
||||
|
||||
/** to access inherited path finder */
|
||||
Tpf& Yapf()
|
||||
Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ public:
|
||||
typedef typename Node::Key Key; ///< key to hash tables
|
||||
|
||||
/** to access inherited path finder */
|
||||
Tpf& Yapf()
|
||||
Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
typedef typename Types::TrackFollower TrackFollower; ///< TrackFollower. Need to typedef for gcc 2.95
|
||||
|
||||
/** to access inherited path finder */
|
||||
Tpf& Yapf()
|
||||
Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ protected:
|
||||
bool m_any_depot;
|
||||
|
||||
/** to access inherited path finder */
|
||||
Tpf& Yapf()
|
||||
Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
|
@@ -97,7 +97,7 @@ struct CYapfNodeT {
|
||||
return m_key.m_td;
|
||||
}
|
||||
|
||||
inline const Tkey_& GetKey() const
|
||||
inline const Tkey_ &GetKey() const
|
||||
{
|
||||
return m_key;
|
||||
}
|
||||
|
@@ -82,7 +82,7 @@ struct CYapfRailSegment
|
||||
, m_hash_next(nullptr)
|
||||
{}
|
||||
|
||||
inline const Key& GetKey() const
|
||||
inline const Key &GetKey() const
|
||||
{
|
||||
return m_key;
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
protected:
|
||||
/** to access inherited pathfinder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
|
||||
protected:
|
||||
/** to access inherited path finder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -287,7 +287,7 @@ public:
|
||||
|
||||
protected:
|
||||
/** to access inherited path finder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -370,7 +370,7 @@ public:
|
||||
|
||||
protected:
|
||||
/** to access inherited path finder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ protected:
|
||||
CYapfCostRoadT() : m_max_cost(0) {};
|
||||
|
||||
/** to access inherited path finder */
|
||||
Tpf& Yapf()
|
||||
Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
typedef typename Node::Key Key; ///< key to hash tables
|
||||
|
||||
/** to access inherited path finder */
|
||||
Tpf& Yapf()
|
||||
Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
|
||||
protected:
|
||||
/** to access inherited path finder */
|
||||
Tpf& Yapf()
|
||||
Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -325,7 +325,7 @@ public:
|
||||
|
||||
protected:
|
||||
/** to access inherited path finder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
|
@@ -47,14 +47,14 @@ public:
|
||||
|
||||
protected:
|
||||
/** to access inherited path finder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf*>(this);
|
||||
}
|
||||
|
||||
public:
|
||||
/** Called by YAPF to detect if node ends in the desired destination */
|
||||
inline bool PfDetectDestination(Node& n)
|
||||
inline bool PfDetectDestination(Node &n)
|
||||
{
|
||||
return PfDetectDestinationTile(n.m_segment_last_tile, n.m_segment_last_td);
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
* Called by YAPF to calculate cost estimate. Calculates distance to the destination
|
||||
* adds it to the actual cost from origin and stores the sum to the Node::m_estimate
|
||||
*/
|
||||
inline bool PfCalcEstimate(Node& n)
|
||||
inline bool PfCalcEstimate(Node &n)
|
||||
{
|
||||
static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0};
|
||||
static const int dg_dir_to_y_offs[] = {0, 1, 0, -1};
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
|
||||
protected:
|
||||
/** to access inherited path finder */
|
||||
inline Tpf& Yapf()
|
||||
inline Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
|
||||
protected:
|
||||
/** to access inherited path finder */
|
||||
Tpf& Yapf()
|
||||
Tpf &Yapf()
|
||||
{
|
||||
return *static_cast<Tpf *>(this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user