From 80bf762556955d59931625ae88009d869b5d16c3 Mon Sep 17 00:00:00 2001 From: Florent Rougon <f.rougon@free.fr> Date: Tue, 29 Nov 2016 16:35:31 +0100 Subject: [PATCH] Replace C++-version-dependent conditional code with the C++11 variant only --- src/Airports/apt_loader.cxx | 15 +++------------ src/Airports/apt_loader.hxx | 12 +----------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/src/Airports/apt_loader.cxx b/src/Airports/apt_loader.cxx index 0da074dee..b2f9c62ee 100644 --- a/src/Airports/apt_loader.cxx +++ b/src/Airports/apt_loader.cxx @@ -189,12 +189,7 @@ void APTLoader::readAptDatFile(const SGPath &aptdb_file, airportInfo.file = aptdb_file; airportInfo.rowCode = rowCode; airportInfo.firstLineNum = line_num; - airportInfo.firstLineTokens = -#if __cplusplus >= 201103L - std::move(tokens); // requires C++11, untested -#else - tokens; -#endif + airportInfo.firstLineTokens = std::move(tokens); } } else if ( rowCode == 99 ) { SG_LOG( SG_GENERAL, SG_DEBUG, @@ -203,12 +198,8 @@ void APTLoader::readAptDatFile(const SGPath &aptdb_file, } else if ( !skipAirport ) { // Line belonging to an already started, and not skipped airport entry; // just append it. - airportInfoMap[currentAirportId].otherLines. -#if __cplusplus >= 201103L - emplace_back(line_num, rowCode, line); // requires C++11, untested -#else - push_back(Line(line_num, rowCode, line)); -#endif + airportInfoMap[currentAirportId].otherLines.emplace_back( + line_num, rowCode, line); } } // of file reading loop diff --git a/src/Airports/apt_loader.hxx b/src/Airports/apt_loader.hxx index 2536cbbd5..d2c39eb3a 100644 --- a/src/Airports/apt_loader.hxx +++ b/src/Airports/apt_loader.hxx @@ -27,12 +27,7 @@ #include <string> #include <vector> - -#if __cplusplus >= 201103L - #include <unordered_map> -#else - #include <map> -#endif +#include <unordered_map> #include <simgear/compiler.h> #include <simgear/structure/SGSharedPtr.hxx> @@ -91,12 +86,7 @@ private: LinesList otherLines; }; -#if __cplusplus >= 201103L typedef std::unordered_map<std::string, RawAirportInfo> AirportInfoMapType; -#else - typedef std::map<std::string, RawAirportInfo> AirportInfoMapType; -#endif - typedef SGSharedPtr<FGPavement> FGPavementPtr; APTLoader(const APTLoader&); // disable copy constructor