diff options
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; |