diff options
author | smatz <smatz@openttd.org> | 2009-05-16 23:44:36 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-16 23:44:36 +0000 |
commit | ed1e54bd84074412ea9f273b7cd86aed42d844ce (patch) | |
tree | 4a5ab5dbd304f9a53f8f0065bc6965b1680ded78 /src/station_base.h | |
parent | 6221d74644922ea4bbba3ed9cd8bbec42398f77b (diff) | |
download | openttd-ed1e54bd84074412ea9f273b7cd86aed42d844ce.tar.xz |
(svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize()
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 */ |