From 077fa11b3edf46eb124dbec67ba83fae3b6fa8ad Mon Sep 17 00:00:00 2001 From: smatz Date: Mon, 22 Feb 2010 16:02:37 +0000 Subject: [PATCH] (svn r19203) -Codechange: silence some gcc warnings --- src/newgrf_airporttiles.cpp | 6 ++---- src/water_cmd.cpp | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/newgrf_airporttiles.cpp b/src/newgrf_airporttiles.cpp index ef1bc90d92..5dda67132b 100644 --- a/src/newgrf_airporttiles.cpp +++ b/src/newgrf_airporttiles.cpp @@ -41,7 +41,7 @@ AirportTileOverrideManager _airporttile_mngr(NEW_AIRPORTTILE_OFFSET, NUM_AIRPORT */ /* static */ const AirportTileSpec *AirportTileSpec::Get(StationGfx gfx) { - assert(gfx < lengthof(AirportTileSpec::tiles)); + assert((size_t)gfx < lengthof(AirportTileSpec::tiles)); return &AirportTileSpec::tiles[gfx]; } @@ -88,7 +88,7 @@ void AirportTileOverrideManager::SetEntitySpec(const AirportTileSpec *airpts) */ StationGfx GetTranslatedAirportTileID(StationGfx gfx) { - assert(gfx < NUM_AIRPORTTILES); + assert((size_t)gfx < NUM_AIRPORTTILES); const AirportTileSpec *it = AirportTileSpec::Get(gfx); return it->grf_prop.override == INVALID_AIRPORTTILE ? gfx : it->grf_prop.override; } @@ -400,8 +400,6 @@ void AirportAnimationTrigger(Station *st, AirpAnimationTrigger trigger, CargoID { if (st->airport.tile == INVALID_TILE) return; - const AirportSpec *as = st->GetAirportSpec(); - TILE_AREA_LOOP(tile, st->airport) { if (st->TileBelongsToAirport(tile)) AirportTileAnimationTrigger(st, tile, trigger, cargo_type); } diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 5bcde05b24..8074abe19d 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -726,7 +726,6 @@ static void FloodVehicles(TileIndex tile) if (IsAirportTile(tile)) { const Station *st = Station::GetByTile(tile); - const AirportSpec *as = st->GetAirportSpec(); z = 1 + st->Airport()->delta_z; TILE_AREA_LOOP(tile, st->airport) { if (st->TileBelongsToAirport(tile)) FindVehicleOnPos(tile, &z, &FloodVehicleProc);