Codechange: Define INVALID_TOWN as a TownID (#7044)

This commit is contained in:
Joan Josep
2019-01-13 00:20:10 +01:00
committed by Charles Pigott
parent 96854b2b8b
commit 9aecbac2b4
3 changed files with 5 additions and 5 deletions

View File

@@ -3335,7 +3335,7 @@ Town *ClosestTownFromTile(TileIndex tile, uint threshold)
if (!HasTownOwnedRoad(tile)) {
TownID tid = GetTownIndex(tile);
if (tid == (TownID)INVALID_TOWN) {
if (tid == INVALID_TOWN) {
/* in the case we are generating "many random towns", this value may be INVALID_TOWN */
if (_generating_world) return CalcClosestTownFromTile(tile, threshold);
assert(Town::GetNumItems() == 0);