(svn r18718) -Codechange: make a wrapper macro for looping TileAreas

This commit is contained in:
rubidium
2010-01-04 18:30:10 +00:00
parent 87466a4ed0
commit 3e131e2fec
9 changed files with 23 additions and 13 deletions

View File

@@ -1211,7 +1211,7 @@ static const T *FindStationsNearby(TileArea ta, bool distant_join)
_deleted_stations_nearby.Clear();
/* Check the inside, to return, if we sit on another station */
TILE_LOOP(t, ta.w, ta.h, ta.tile) {
TILE_AREA_LOOP(t, ta) {
if (t < MapSize() && IsTileType(t, MP_STATION) && T::IsValidID(GetStationIndex(t))) return T::GetByTile(t);
}