summaryrefslogtreecommitdiff
path: root/src/train.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-13 17:13:20 +0000
committerrubidium <rubidium@openttd.org>2009-12-13 17:13:20 +0000
commit52cbaf2db2f7d2dd398c1c32e7064e5494fa80d3 (patch)
tree66ef575c1b4ae3adaa51fe51011645634d0d41b1 /src/train.h
parentb9b357b8e87b67c14d5b45e087a6196598159f14 (diff)
downloadopenttd-52cbaf2db2f7d2dd398c1c32e7064e5494fa80d3.tar.xz
(svn r18484) -Codechange: simplify the Is(Stopped)InDepot functions for trains
Diffstat (limited to 'src/train.h')
-rw-r--r--src/train.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/train.h b/src/train.h
index ed27ad811..be0239d8e 100644
--- a/src/train.h
+++ b/src/train.h
@@ -49,7 +49,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);
void UpdateTrainAcceleration(Train *v);
void CheckTrainsLengths();
@@ -131,8 +130,8 @@ struct Train : public SpecializedVehicle<Train, VEH_TRAIN> {
int GetDisplayMaxSpeed() const { return this->tcache.cached_max_speed; }
Money GetRunningCost() const;
int GetDisplayImageWidth(Point *offset = NULL) const;
- bool IsInDepot() const { return CheckTrainInDepot(this, false) != -1; }
- bool IsStoppedInDepot() const { return CheckTrainInDepot(this, true) != -1; }
+ bool IsInDepot() const;
+ bool IsStoppedInDepot() const;
bool Tick();
void OnNewDay();
uint Crash(bool flooded = false);