From e7eb6d05a063db3e4bdf9e9a91d2e18f486393c5 Mon Sep 17 00:00:00 2001 From: yexo Date: Sat, 14 Feb 2009 21:16:21 +0000 Subject: (svn r15489) -Change [API CHANGE]: Remove AIAirport::AirportAvailable. AIAirport::IsValidAirportType now only returns true for available AirportTypes. --- src/ai/api/ai_airport.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/ai/api/ai_airport.cpp') diff --git a/src/ai/api/ai_airport.cpp b/src/ai/api/ai_airport.cpp index b2b969b82..ed58701c3 100644 --- a/src/ai/api/ai_airport.cpp +++ b/src/ai/api/ai_airport.cpp @@ -11,7 +11,7 @@ /* static */ bool AIAirport::IsValidAirportType(AirportType type) { - return type >= AT_SMALL && type <= AT_HELISTATION; + return type >= AT_SMALL && type <= AT_HELISTATION && HasBit(::GetValidAirports(), type); } /* static */ bool AIAirport::IsHangarTile(TileIndex tile) @@ -28,13 +28,6 @@ return ::IsTileType(tile, MP_STATION) && ::IsAirport(tile); } -/* static */ bool AIAirport::AirportAvailable(AirportType type) -{ - if (!IsValidAirportType(type)) return false; - - return HasBit(::GetValidAirports(), type); -} - /* static */ int32 AIAirport::GetAirportWidth(AirportType type) { if (!IsValidAirportType(type)) return -1; -- cgit v1.2.3-54-g00ecf