diff options
Diffstat (limited to 'src/station_base.h')
-rw-r--r-- | src/station_base.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/station_base.h b/src/station_base.h index 756d4721d..bbaebbb65 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -211,26 +211,26 @@ static inline StationID GetMaxStationIndex() * _really_ returns the highest index. Now it just returns * the next safe value we are sure about everything is below. */ - return GetStationPoolSize() - 1; + return Station::GetPoolSize() - 1; } static inline uint GetNumStations() { - return GetStationPoolSize(); + return Station::GetPoolSize(); } static inline bool IsValidStationID(StationID index) { - return index < GetStationPoolSize() && Station::Get(index)->IsValid(); + return index < Station::GetPoolSize() && Station::Get(index)->IsValid(); } -#define FOR_ALL_STATIONS_FROM(st, start) for (st = Station::Get(start); st != NULL; st = (st->index + 1U < GetStationPoolSize()) ? Station::Get(st->index + 1U) : NULL) if (st->IsValid()) +#define FOR_ALL_STATIONS_FROM(st, start) for (st = Station::Get(start); st != NULL; st = (st->index + 1U < Station::GetPoolSize()) ? Station::Get(st->index + 1U) : NULL) if (st->IsValid()) #define FOR_ALL_STATIONS(st) FOR_ALL_STATIONS_FROM(st, 0) /* Stuff for ROADSTOPS */ -#define FOR_ALL_ROADSTOPS_FROM(rs, start) for (rs = RoadStop::Get(start); rs != NULL; rs = (rs->index + 1U < GetRoadStopPoolSize()) ? RoadStop::Get(rs->index + 1U) : NULL) if (rs->IsValid()) +#define FOR_ALL_ROADSTOPS_FROM(rs, start) for (rs = RoadStop::Get(start); rs != NULL; rs = (rs->index + 1U < RoadStop::GetPoolSize()) ? RoadStop::Get(rs->index + 1U) : NULL) if (rs->IsValid()) #define FOR_ALL_ROADSTOPS(rs) FOR_ALL_ROADSTOPS_FROM(rs, 0) /* End of stuff for ROADSTOPS */ |