summaryrefslogtreecommitdiff
path: root/src/train.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-11 22:04:57 +0000
committerrubidium <rubidium@openttd.org>2009-12-11 22:04:57 +0000
commitb09431263183701036e5b3f579e87ddcdeab4c43 (patch)
treebcaad0f9b48dbab515be82d5c24bcd4552e297f4 /src/train.h
parent64f1e188300105d9acaf0a1dd26186fc533d04bd (diff)
downloadopenttd-b09431263183701036e5b3f579e87ddcdeab4c43.tar.xz
(svn r18465) -Codechange: simplify CheckTrainInDepot and remove some unneeded wrapper functions
Diffstat (limited to 'src/train.h')
-rw-r--r--src/train.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/train.h b/src/train.h
index f4f8d741b..ed27ad811 100644
--- a/src/train.h
+++ b/src/train.h
@@ -50,7 +50,6 @@ void CcBuildWagon(bool success, TileIndex tile, uint32 p1, uint32 p2);
byte FreightWagonMult(CargoID cargo);
int CheckTrainInDepot(const Train *v, bool needs_to_be_stopped);
-int CheckTrainStoppedInDepot(const Train *v);
void UpdateTrainAcceleration(Train *v);
void CheckTrainsLengths();
@@ -133,7 +132,7 @@ struct Train : public SpecializedVehicle<Train, VEH_TRAIN> {
Money GetRunningCost() const;
int GetDisplayImageWidth(Point *offset = NULL) const;
bool IsInDepot() const { return CheckTrainInDepot(this, false) != -1; }
- bool IsStoppedInDepot() const { return CheckTrainStoppedInDepot(this) >= 0; }
+ bool IsStoppedInDepot() const { return CheckTrainInDepot(this, true) != -1; }
bool Tick();
void OnNewDay();
uint Crash(bool flooded = false);