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/town.h | |
parent | 6221d74644922ea4bbba3ed9cd8bbec42398f77b (diff) | |
download | openttd-ed1e54bd84074412ea9f273b7cd86aed42d844ce.tar.xz |
(svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize()
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 71f65f552..bc746fb83 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() && Town::Get(index)->IsValid(); + return index < Town::GetPoolSize() && Town::Get(index)->IsValid(); } static inline TownID GetMaxTownIndex() @@ -312,7 +312,7 @@ static inline TownID GetMaxTownIndex() * _really_ returns the highest index. Now it just returns * the next safe value we are sure about everything is below. */ - return GetTownPoolSize() - 1; + return Town::GetPoolSize() - 1; } static inline uint GetNumTowns() @@ -346,7 +346,7 @@ static inline Town *GetRandomTown() Town *CalcClosestTownFromTile(TileIndex tile, uint threshold = UINT_MAX); -#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_FROM(t, start) for (t = Town::Get(start); t != NULL; t = (t->index + 1U < Town::GetPoolSize()) ? Town::Get(t->index + 1U) : NULL) if (t->IsValid()) #define FOR_ALL_TOWNS(t) FOR_ALL_TOWNS_FROM(t, 0) extern Town *_cleared_town; |