summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
authorJoan Josep <juanjo.ng.83@gmail.com>2019-01-13 00:20:10 +0100
committerCharles Pigott <charlespigott@googlemail.com>2019-01-12 23:20:10 +0000
commit9aecbac2b4a4137abc44ff12a672916ec7482047 (patch)
tree90c5399832b5122a63f6eaef6506d92e1299de2b /src/town_cmd.cpp
parent96854b2b8bea85926113326e1fd37ee357f7e59e (diff)
downloadopenttd-9aecbac2b4a4137abc44ff12a672916ec7482047.tar.xz
Codechange: Define INVALID_TOWN as a TownID (#7044)
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 927651864..4289d901a 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -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);