diff options
author | PeterN <peter@fuzzle.org> | 2019-04-13 14:12:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-13 14:12:34 +0100 |
commit | abe8cf4985da211ad70c6232a3c737f15574f5de (patch) | |
tree | b391f3da8a64d9534f56f22d492bb6095b113343 /src/station.cpp | |
parent | 801cbea9cce1e04e6921bb087add8206cffe1fe1 (diff) | |
download | openttd-abe8cf4985da211ad70c6232a3c737f15574f5de.tar.xz |
Codechange: Replace duplicated code with TileArea::Expand() (#7467)
Diffstat (limited to 'src/station.cpp')
-rw-r--r-- | src/station.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station.cpp b/src/station.cpp index b211c6422..85603a38c 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -449,7 +449,7 @@ void Station::RecomputeCatchment() if (r == CA_NONE) continue; /* This tile sub-loop doesn't need to test any tiles, they are simply added to the catchment set. */ - TileArea ta2(TileXY(max<int>(TileX(tile) - r, 0), max<int>(TileY(tile) - r, 0)), TileXY(min<int>(TileX(tile) + r, MapMaxX()), min<int>(TileY(tile) + r, MapMaxY()))); + TileArea ta2 = TileArea(tile, 1, 1).Expand(r); TILE_AREA_LOOP(tile2, ta2) this->catchment_tiles.SetTile(tile2); } |