diff options
author | smatz <smatz@openttd.org> | 2009-05-16 23:34:14 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-16 23:34:14 +0000 |
commit | 6221d74644922ea4bbba3ed9cd8bbec42398f77b (patch) | |
tree | 0069bbd6bb7525754c5d9353132f5dc64a0996cc /src/town.h | |
parent | 814f153b5a98e0030cbd221e6a89e083ce62bb1d (diff) | |
download | openttd-6221d74644922ea4bbba3ed9cd8bbec42398f77b.tar.xz |
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
Diffstat (limited to 'src/town.h')
-rw-r--r-- | src/town.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/town.h b/src/town.h index fe50fd17a..71f65f552 100644 --- a/src/town.h +++ b/src/town.h @@ -302,7 +302,7 @@ TileIndexDiff GetHouseNorthPart(HouseID &house); */ static inline bool IsValidTownID(TownID index) { - return index < GetTownPoolSize() && GetTown(index)->IsValid(); + return index < GetTownPoolSize() && Town::Get(index)->IsValid(); } static inline TownID GetMaxTownIndex() @@ -341,12 +341,12 @@ static inline Town *GetRandomTown() } } - return GetTown(index); + return Town::Get(index); } Town *CalcClosestTownFromTile(TileIndex tile, uint threshold = UINT_MAX); -#define FOR_ALL_TOWNS_FROM(t, start) for (t = GetTown(start); t != NULL; t = (t->index + 1U < GetTownPoolSize()) ? GetTown(t->index + 1U) : NULL) if (t->IsValid()) +#define FOR_ALL_TOWNS_FROM(t, start) for (t = Town::Get(start); t != NULL; t = (t->index + 1U < GetTownPoolSize()) ? Town::Get(t->index + 1U) : NULL) if (t->IsValid()) #define FOR_ALL_TOWNS(t) FOR_ALL_TOWNS_FROM(t, 0) extern Town *_cleared_town; |