diff options
author | yexo <yexo@openttd.org> | 2010-03-19 09:58:46 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-03-19 09:58:46 +0000 |
commit | f2743cd5ed72a2d6224ffa828aab796ed771cef2 (patch) | |
tree | b8f2dc1b94e52007b88e9020d9ef0187b9b00ee7 /src/station_base.h | |
parent | 414071d07f787042364fec573030720ba664154e (diff) | |
download | openttd-f2743cd5ed72a2d6224ffa828aab796ed771cef2.tar.xz |
(svn r19464) -Codechange: move GetHangarTile to Airport
Diffstat (limited to 'src/station_base.h')
-rw-r--r-- | src/station_base.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/station_base.h b/src/station_base.h index f15a5dabd..9a0da91dc 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -67,6 +67,13 @@ struct Airport : public TileArea { { return this->GetSpec()->nof_depots > 0; } + + FORCEINLINE TileIndex GetHangarTile(uint hangar_num) const + { + assert(this->tile != INVALID_TILE); + assert(hangar_num < this->GetSpec()->nof_depots); + return this->tile + ToTileIndexDiff(this->GetSpec()->depot_table[hangar_num]); + } }; typedef SmallVector<Industry *, 2> IndustryVector; @@ -135,13 +142,6 @@ public: return IsAirportTile(tile) && GetStationIndex(tile) == this->index; } - FORCEINLINE TileIndex GetHangarTile(uint hangar_num) const - { - assert(this->airport.tile != INVALID_TILE); - assert(hangar_num < this->airport.GetSpec()->nof_depots); - return this->airport.tile + ToTileIndexDiff(this->airport.GetSpec()->depot_table[hangar_num]); - } - /* virtual */ uint32 GetNewGRFVariable(const ResolverObject *object, byte variable, byte parameter, bool *available) const; /* virtual */ void GetTileArea(TileArea *ta, StationType type) const; |