(svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize()
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user