summaryrefslogtreecommitdiff
path: root/src/station_base.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-24 17:39:54 +0000
committersmatz <smatz@openttd.org>2009-06-24 17:39:54 +0000
commit8343340acb5bdb40555e04f40aac567d6e583bb8 (patch)
tree29b17ad863977abd3d3417dd8bbf84e01cfc261d /src/station_base.h
parentb18bf87c9081c3d202897e9c3ed282729db415a4 (diff)
downloadopenttd-8343340acb5bdb40555e04f40aac567d6e583bb8.tar.xz
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
Diffstat (limited to 'src/station_base.h')
-rw-r--r--src/station_base.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/station_base.h b/src/station_base.h
index 7ab2c9c0b..7f2303b0a 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -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)