summaryrefslogtreecommitdiff
path: root/src/station_base.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-16 23:34:14 +0000
committersmatz <smatz@openttd.org>2009-05-16 23:34:14 +0000
commit6221d74644922ea4bbba3ed9cd8bbec42398f77b (patch)
tree0069bbd6bb7525754c5d9353132f5dc64a0996cc /src/station_base.h
parent814f153b5a98e0030cbd221e6a89e083ce62bb1d (diff)
downloadopenttd-6221d74644922ea4bbba3ed9cd8bbec42398f77b.tar.xz
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
Diffstat (limited to 'src/station_base.h')
-rw-r--r--src/station_base.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/station_base.h b/src/station_base.h
index 97477324d..756d4721d 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -221,16 +221,16 @@ static inline uint GetNumStations()
static inline bool IsValidStationID(StationID index)
{
- return index < GetStationPoolSize() && GetStation(index)->IsValid();
+ return index < GetStationPoolSize() && Station::Get(index)->IsValid();
}
-#define FOR_ALL_STATIONS_FROM(st, start) for (st = GetStation(start); st != NULL; st = (st->index + 1U < GetStationPoolSize()) ? GetStation(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 < GetStationPoolSize()) ? 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 = GetRoadStop(start); rs != NULL; rs = (rs->index + 1U < GetRoadStopPoolSize()) ? GetRoadStop(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 < GetRoadStopPoolSize()) ? 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 */