(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()

This commit is contained in:
smatz
2009-06-24 17:39:54 +00:00
parent b18bf87c90
commit 8343340acb
38 changed files with 70 additions and 55 deletions

View File

@@ -18,6 +18,7 @@
#include "industry_type.h"
#include "core/geometry_type.hpp"
#include "viewport_type.h"
#include "station_map.h"
#include <list>
typedef Pool<Station, StationID, 32, 64000> StationPool;
@@ -161,6 +162,11 @@ public:
bool IsBuoy() const;
uint GetCatchmentRadius() const;
static FORCEINLINE Station *GetByTile(TileIndex tile)
{
return Station::Get(GetStationIndex(tile));
}
};
#define FOR_ALL_STATIONS_FROM(var, start) FOR_ALL_ITEMS_FROM(Station, station_index, var, start)