summaryrefslogtreecommitdiff
path: root/src/yapf/yapf_ship.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2009-03-04 08:02:16 +0000
committerpeter1138 <peter1138@openttd.org>2009-03-04 08:02:16 +0000
commitceea4927df5b0e98221a7af6406315c41ab63250 (patch)
treec01ea5ac1459d5c07f3332f8887c8df85fe37e54 /src/yapf/yapf_ship.cpp
parent1bd82bf71dcbec9e27db43c54b1f12f0f211b5ef (diff)
downloadopenttd-ceea4927df5b0e98221a7af6406315c41ab63250.tar.xz
(svn r15609) -Fix: Code style...
Diffstat (limited to 'src/yapf/yapf_ship.cpp')
-rw-r--r--src/yapf/yapf_ship.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/yapf/yapf_ship.cpp b/src/yapf/yapf_ship.cpp
index 6f75cba17..fee0eed3c 100644
--- a/src/yapf/yapf_ship.cpp
+++ b/src/yapf/yapf_ship.cpp
@@ -18,7 +18,10 @@ public:
protected:
/// to access inherited path finder
- FORCEINLINE Tpf& Yapf() {return *static_cast<Tpf*>(this);}
+ FORCEINLINE Tpf& Yapf()
+ {
+ return *static_cast<Tpf*>(this);
+ }
public:
/** Called by YAPF to move from the given node to the next tile. For each
@@ -27,12 +30,16 @@ public:
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))
+ if (F.Follow(old_node.m_key.m_tile, old_node.m_key.m_td)) {
Yapf().AddMultipleNodes(&old_node, F);
+ }
}
/// return debug report character to identify the transportation type
- FORCEINLINE char TransportTypeChar() const {return 'w';}
+ FORCEINLINE char TransportTypeChar() const
+ {
+ return 'w';
+ }
static Trackdir ChooseShipTrack(const Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks)
{
@@ -94,7 +101,10 @@ public:
protected:
/// to access inherited path finder
- Tpf& Yapf() {return *static_cast<Tpf*>(this);}
+ Tpf& Yapf()
+ {
+ return *static_cast<Tpf*>(this);
+ }
public:
/** Called by YAPF to calculate the cost from the origin to the given node.
@@ -168,7 +178,7 @@ Trackdir YapfChooseShipTrack(const Vehicle *v, TileIndex tile, DiagDirection ent
}
/** performance measurement helper */
-void * NpfBeginInterval()
+void *NpfBeginInterval()
{
CPerformanceTimer& perf = *new CPerformanceTimer;
perf.Start();