(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

@@ -31,7 +31,7 @@ protected:
/** to access inherited path finder */
inline Tpf& Yapf()
{
return *static_cast<Tpf*>(this);
return *static_cast<Tpf *>(this);
}
public:
@@ -40,7 +40,7 @@ public:
* reachable trackdir on the new tile creates new node, initializes it
* and adds it to the open list by calling Yapf().AddNewNode(n)
*/
inline void PfFollowNode(Node& old_node)
inline void PfFollowNode(Node &old_node)
{
TrackFollower F(Yapf().GetVehicle());
if (F.Follow(old_node.m_key.m_tile, old_node.m_key.m_td)) {
@@ -97,7 +97,7 @@ public:
pNode = pNode->m_parent;
}
/* return trackdir from the best next node (direct child of origin) */
Node& best_next_node = *pPrevNode;
Node &best_next_node = *pPrevNode;
assert(best_next_node.GetTile() == tile);
next_trackdir = best_next_node.GetTrackdir();
}
@@ -155,7 +155,7 @@ protected:
/** to access inherited path finder */
Tpf& Yapf()
{
return *static_cast<Tpf*>(this);
return *static_cast<Tpf *>(this);
}
public:
@@ -164,7 +164,7 @@ public:
* Calculates only the cost of given node, adds it to the parent node cost
* and stores the result into Node::m_cost member
*/
inline bool PfCalcCost(Node& n, const TrackFollower *tf)
inline bool PfCalcCost(Node &n, const TrackFollower *tf)
{
/* base tile cost depending on distance */
int c = IsDiagonalTrackdir(n.GetTrackdir()) ? YAPF_TILE_LENGTH : YAPF_TILE_CORNER_LENGTH;