# HG changeset patch # User rubidium # Date 2009-08-03 09:10:28 # Node ID caf31ff34da7c69199fb955071a980c531db845e # Parent 4e664762493be97df0506a42f52597654ed2dc25 (svn r17050) -Codechange: replace custom implementation of TILE_LOOP with TILE_LOOP. diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -817,14 +817,10 @@ void DeallocateSpecFromStation(BaseStati 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 */