(svn r19464) -Codechange: move GetHangarTile to Airport

This commit is contained in:
yexo
2010-03-19 09:58:46 +00:00
parent 79909cedee
commit 455bb65282
6 changed files with 13 additions and 13 deletions

View File

@@ -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;