summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-08-03 09:10:28 +0000
committerrubidium <rubidium@openttd.org>2009-08-03 09:10:28 +0000
commitd1bc38a619a19e83214d2695c0808b47c3470834 (patch)
tree9ed85f3dd9932f02818b382ee145fd5e1ff91813 /src
parent8112cb8aff2381c0100b360dab8cafcc3d03f351 (diff)
downloadopenttd-d1bc38a619a19e83214d2695c0808b47c3470834.tar.xz
(svn r17050) -Codechange: replace custom implementation of TILE_LOOP with TILE_LOOP.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_station.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index 9a84418d5..964673103 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -817,14 +817,10 @@ void DeallocateSpecFromStation(BaseStation *st, byte specindex)
ETileArea area = ETileArea(st, INVALID_TILE, TA_WHOLE);
/* Check all tiles over the station to check if the specindex is still in use */
- for (uint y = 0; y < area.h; y++) {
- for (uint x = 0; x < area.w; x++) {
- if (st->TileBelongsToRailStation(area.tile) && GetCustomStationSpecIndex(area.tile) == specindex) {
- return;
- }
- area.tile += TileDiffXY(1, 0);
+ TILE_LOOP(tile, area.w, area.h, area.tile) {
+ if (st->TileBelongsToRailStation(tile) && GetCustomStationSpecIndex(tile) == specindex) {
+ return;
}
- area.tile += TileDiffXY(-area.w, 1);
}
/* This specindex is no longer in use, so deallocate it */