summaryrefslogtreecommitdiff
path: root/src/pathfinder/yapf/yapf_destrail.hpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2015-08-08 10:06:24 +0000
committeralberth <alberth@openttd.org>2015-08-08 10:06:24 +0000
commitb885d79f506bde93b4ab278b3f84b8ca6254f3b9 (patch)
treeed7e027c4444181baab5b4ef6b667cd179f29a65 /src/pathfinder/yapf/yapf_destrail.hpp
parent9cadc0e1504cf979c14e1cb42bfe51a29675dd81 (diff)
downloadopenttd-b885d79f506bde93b4ab278b3f84b8ca6254f3b9.tar.xz
(svn r27362) -Codechange: Codestyle fixes for reference var declarations, static cast type, operator methods.
Diffstat (limited to 'src/pathfinder/yapf/yapf_destrail.hpp')
-rw-r--r--src/pathfinder/yapf/yapf_destrail.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pathfinder/yapf/yapf_destrail.hpp b/src/pathfinder/yapf/yapf_destrail.hpp
index 901e026d8..37525bfa2 100644
--- a/src/pathfinder/yapf/yapf_destrail.hpp
+++ b/src/pathfinder/yapf/yapf_destrail.hpp
@@ -47,11 +47,11 @@ public:
/** to access inherited path finder */
Tpf& Yapf()
{
- return *static_cast<Tpf*>(this);
+ return *static_cast<Tpf *>(this);
}
/** Called by YAPF to detect if node ends in the desired destination */
- inline bool PfDetectDestination(Node& n)
+ inline bool PfDetectDestination(Node &n)
{
return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir());
}
@@ -67,7 +67,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)
{
n.m_estimate = n.m_cost;
return true;
@@ -87,11 +87,11 @@ public:
/** to access inherited path finder */
Tpf& Yapf()
{
- return *static_cast<Tpf*>(this);
+ return *static_cast<Tpf *>(this);
}
/** Called by YAPF to detect if node ends in the desired destination */
- inline bool PfDetectDestination(Node& n)
+ inline bool PfDetectDestination(Node &n)
{
return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir());
}
@@ -107,7 +107,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)
{
n.m_estimate = n.m_cost;
return true;
@@ -131,7 +131,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:
}
/** Called by YAPF to detect if node ends in the desired destination */
- inline bool PfDetectDestination(Node& n)
+ inline bool PfDetectDestination(Node &n)
{
return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir());
}
@@ -188,7 +188,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};