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_ship.cpp | |
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_ship.cpp')
-rw-r--r-- | src/pathfinder/yapf/yapf_ship.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp index a01444a9e..e4b99462d 100644 --- a/src/pathfinder/yapf/yapf_ship.cpp +++ b/src/pathfinder/yapf/yapf_ship.cpp @@ -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; |