From 8da16eddd635f8e584636a118976fe3b8f371b0e Mon Sep 17 00:00:00 2001 From: gallaert Date: Tue, 14 Apr 2020 12:48:14 +0100 Subject: [PATCH] Replace boost::to_lower and boost::to_upper by strutils::lowercase and strutils::uppercase --- src/Scripting/NasalPositioned_cppbind.cxx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Scripting/NasalPositioned_cppbind.cxx b/src/Scripting/NasalPositioned_cppbind.cxx index b8816e263..c710bbeb3 100644 --- a/src/Scripting/NasalPositioned_cppbind.cxx +++ b/src/Scripting/NasalPositioned_cppbind.cxx @@ -28,8 +28,6 @@ #include #include -#include - #include #include #include @@ -89,14 +87,14 @@ static naRef f_navaid_course(FGNavRecord& nav, naContext) } //------------------------------------------------------------------------------ -static FGRunwayBaseRef f_airport_runway(FGAirport& apt, std::string ident) +static FGRunwayBaseRef f_airport_runway(FGAirport& apt, const std::string& ident) { - boost::to_upper(ident); + const std::string Id = simgear::strutils::uppercase (ident); - if( apt.hasRunwayWithIdent(ident) ) - return apt.getRunwayByIdent(ident); - else if( apt.hasHelipadWithIdent(ident) ) - return apt.getHelipadByIdent(ident); + if( apt.hasRunwayWithIdent(Id) ) + return apt.getRunwayByIdent(Id); + else if( apt.hasHelipadWithIdent(Id) ) + return apt.getHelipadByIdent(Id); return 0; } @@ -184,10 +182,9 @@ static naRef f_airport_approaches(FGAirport& apt, const nasal::CallContext& ctx) FGRunway* rwy = runwayFromNasalArg(apt, ctx); flightgear::ProcedureType type = flightgear::PROCEDURE_INVALID; - std::string type_str = ctx.getArg(1); + const std::string type_str = simgear::strutils::uppercase (ctx.getArg(1)); if( !type_str.empty() ) { - boost::to_upper(type_str); if( type_str == "NDB" ) type = flightgear::PROCEDURE_APPROACH_NDB; else if( type_str == "VOR" ) type = flightgear::PROCEDURE_APPROACH_VOR; else if( type_str == "ILS" ) type = flightgear::PROCEDURE_APPROACH_ILS;