X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNavaids%2Fnavdb.cxx;h=4f7c10e7f8e89241e3d67d532ee6d7cfac6e0856;hb=2e6d7e111aa3681e764ba57dc5c03e595dea8422;hp=95f7f77eef15f1b72d1e4f32cefc360fa9331230;hpb=f9de92f53db91c45e4bd885ba606749e9597fdbb;p=flightgear.git diff --git a/src/Navaids/navdb.cxx b/src/Navaids/navdb.cxx index 95f7f77ee..4f7c10e7f 100644 --- a/src/Navaids/navdb.cxx +++ b/src/Navaids/navdb.cxx @@ -38,9 +38,9 @@ #include "navrecord.hxx" #include "navlist.hxx" #include "navdb.hxx" -#include "Main/globals.hxx" -#include "Navaids/markerbeacon.hxx" -#include "Airports/simple.hxx" +#include
+#include +#include using std::string; @@ -51,8 +51,8 @@ mapRobinTypeToFGPType(int aTy) // case 1: case 2: return FGPositioned::NDB; case 3: return FGPositioned::VOR; - case 4: return FGPositioned::LOC; - case 5: return FGPositioned::ILS; + case 4: return FGPositioned::ILS; + case 5: return FGPositioned::LOC; case 6: return FGPositioned::GS; case 12: case 13: return FGPositioned::DME; @@ -240,11 +240,10 @@ FGRunway* getRunwayFromName(const std::string& aName) return NULL; } - FGRunway* runway = apt->getRunwayByIdent(parts[1]); - if (!runway) { + if (!apt->hasRunwayWithIdent(parts[1])) { SG_LOG(SG_GENERAL, SG_WARN, "navaid " << aName << " associated with bogus runway ID:" << parts[1]); return NULL; } - return runway; + return apt->getRunwayByIdent(parts[1]); }