(svn r16746) -Codechange: use Town::PostDestructor() instead of not very clean construct for invalidating nearest town for road tiles

This commit is contained in:
smatz
2009-07-05 13:21:51 +00:00
parent c861d9b64b
commit 59f94619c7
4 changed files with 16 additions and 7 deletions

View File

@@ -142,6 +142,7 @@ struct Town : TownPool::PoolItem<&_town_pool> {
}
static Town *GetRandom();
static void PostDestructor(size_t index);
};
uint32 GetWorldPopulation();
@@ -181,7 +182,7 @@ bool CheckforTownRating(DoCommandFlag flags, Town *t, TownRatingCheckType type);
TileIndexDiff GetHouseNorthPart(HouseID &house);
Town *CalcClosestTownFromTile(TileIndex tile, uint threshold = UINT_MAX, const Town *ignore = NULL);
Town *CalcClosestTownFromTile(TileIndex tile, uint threshold = UINT_MAX);
#define FOR_ALL_TOWNS_FROM(var, start) FOR_ALL_ITEMS_FROM(Town, town_index, var, start)
#define FOR_ALL_TOWNS(var) FOR_ALL_TOWNS_FROM(var, 0)