Replace C++-version-dependent conditional code with the C++11 variant only
This commit is contained in:
parent
53d50d9ba0
commit
80bf762556
2 changed files with 4 additions and 23 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue