]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/navdb.cxx
gcc warning fixes
[flightgear.git] / src / Navaids / navdb.cxx
index 95f7f77eef15f1b72d1e4f32cefc360fa9331230..4f7c10e7f8e89241e3d67d532ee6d7cfac6e0856 100644 (file)
@@ -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 <Main/globals.hxx>
+#include <Navaids/markerbeacon.hxx>
+#include <Airports/simple.hxx>
 
 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]);
 }