summaryrefslogtreecommitdiff
path: root/src/station_base.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-25 23:49:59 +0000
committersmatz <smatz@openttd.org>2009-06-25 23:49:59 +0000
commitf2e55319dd165f57e008e0fac355ce294fc98905 (patch)
tree7cb71b2eea39837e4e8ebfb80205ff31367f32ee /src/station_base.h
parentc0ac230e3ea48e2e640dc74bc257f6f22d37bca3 (diff)
downloadopenttd-f2e55319dd165f57e008e0fac355ce294fc98905.tar.xz
(svn r16661) -Codechange: move definition of few very short functions to header files
Diffstat (limited to 'src/station_base.h')
-rw-r--r--src/station_base.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/station_base.h b/src/station_base.h
index 6cd60094e..266f45d19 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -160,16 +160,28 @@ public:
* @ingroup dirty
*/
void MarkTilesDirty(bool cargo_change) const;
- bool TileBelongsToRailStation(TileIndex tile) const;
+
uint GetPlatformLength(TileIndex tile, DiagDirection dir) const;
uint GetPlatformLength(TileIndex tile) const;
- bool IsBuoy() const;
-
void RecomputeIndustriesNear();
static void RecomputeIndustriesNearForAll();
uint GetCatchmentRadius() const;
+ FORCEINLINE bool TileBelongsToRailStation(TileIndex tile) const
+ {
+ return IsRailwayStationTile(tile) && GetStationIndex(tile) == this->index;
+ }
+
+ /**
+ * Determines whether a station is a buoy only.
+ * @todo Ditch this encoding of buoys
+ */
+ FORCEINLINE bool IsBuoy() const
+ {
+ return (this->had_vehicle_of_type & HVOT_BUOY) != 0;
+ }
+
static FORCEINLINE Station *GetByTile(TileIndex tile)
{
return Station::Get(GetStationIndex(tile));