(svn r16876) -Codechange: add helper functions to cast to Station/Waypoint with some extra checks.

This commit is contained in:
rubidium
2009-07-18 18:39:17 +00:00
parent ad880457cf
commit 196dd0974f
4 changed files with 61 additions and 17 deletions

View File

@@ -17,10 +17,10 @@
typedef Pool<Waypoint, WaypointID, 32, 64000> WaypointPool;
extern WaypointPool _waypoint_pool;
struct Waypoint : WaypointPool::PoolItem<&_waypoint_pool>, BaseStation {
struct Waypoint : WaypointPool::PoolItem<&_waypoint_pool>, SpecializedStation<Waypoint, true> {
uint16 town_cn; ///< The Nth waypoint for this town (consecutive number)
Waypoint(TileIndex tile = INVALID_TILE) : BaseStation(tile) { }
Waypoint(TileIndex tile = INVALID_TILE) : SpecializedStation<Waypoint, true>(tile) { }
~Waypoint();
void UpdateVirtCoord();