summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-02-22 16:32:50 +0000
committeryexo <yexo@openttd.org>2010-02-22 16:32:50 +0000
commitbeec6fa9e21c38573176654e49062f2f604a47a7 (patch)
treec303f2558ec9d4ac39adb137a36beb3589e88305 /src
parentb1151645c0128842bea3d4f46bf9c6b007d96555 (diff)
downloadopenttd-beec6fa9e21c38573176654e49062f2f604a47a7.tar.xz
(svn r19208) -Codechange: fix a gcc warning
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_airporttiles.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newgrf_airporttiles.cpp b/src/newgrf_airporttiles.cpp
index 5dda67132..881dd8e09 100644
--- a/src/newgrf_airporttiles.cpp
+++ b/src/newgrf_airporttiles.cpp
@@ -41,7 +41,9 @@ AirportTileOverrideManager _airporttile_mngr(NEW_AIRPORTTILE_OFFSET, NUM_AIRPORT
*/
/* static */ const AirportTileSpec *AirportTileSpec::Get(StationGfx gfx)
{
- assert((size_t)gfx < lengthof(AirportTileSpec::tiles));
+ /* should be assert(gfx < lengthof(tiles)), but that gives compiler warnings
+ * since it's always true if the following holds: */
+ assert_compile(MAX_UVALUE(StationGfx) + 1 == lengthof(tiles));
return &AirportTileSpec::tiles[gfx];
}
@@ -88,7 +90,6 @@ void AirportTileOverrideManager::SetEntitySpec(const AirportTileSpec *airpts)
*/
StationGfx GetTranslatedAirportTileID(StationGfx gfx)
{
- assert((size_t)gfx < NUM_AIRPORTTILES);
const AirportTileSpec *it = AirportTileSpec::Get(gfx);
return it->grf_prop.override == INVALID_AIRPORTTILE ? gfx : it->grf_prop.override;
}