(svn r15642) -Codechange: use a default parameter value in CalcClosestTownFromTile

This commit is contained in:
smatz
2009-03-08 01:20:11 +00:00
parent c718984618
commit f5b24edc1e
4 changed files with 9 additions and 9 deletions

View File

@@ -340,7 +340,7 @@ static inline Town *GetRandomTown()
return GetTown(index);
}
Town *CalcClosestTownFromTile(TileIndex tile, uint threshold);
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(t) FOR_ALL_TOWNS_FROM(t, 0)