]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/simple.cxx
Avoid some useless file accesses
[flightgear.git] / src / Airports / simple.cxx
index f4f3d1adbfd87538eded3dcdf35fba315934378a..7354db28be12753f00648058241645d9b77f4b7c 100644 (file)
@@ -96,20 +96,18 @@ bool FGAirport::isHeliport() const
 
 FGAirportDynamics * FGAirport::getDynamics()
 {
-    if (_dynamics != 0) {
+    if (_dynamics) {
         return _dynamics;
-    } else {
-        //cerr << "Trying to load dynamics for " << _id << endl;
-        _dynamics = new FGAirportDynamics(this);
-        XMLLoader::load(_dynamics);
-
-        FGRunwayPreference rwyPrefs(this);
-        XMLLoader::load(&rwyPrefs);
-        _dynamics->setRwyUse(rwyPrefs);
+    }
+    
+    _dynamics = new FGAirportDynamics(this);
+    XMLLoader::load(_dynamics);
 
-        //FGSidStar SIDs(this);
-        XMLLoader::load(_dynamics->getSIDs());
-   }
+    FGRunwayPreference rwyPrefs(this);
+    XMLLoader::load(&rwyPrefs);
+    _dynamics->setRwyUse(rwyPrefs);
+    XMLLoader::load(_dynamics->getSIDs());
+    
     return _dynamics;
 }
 
@@ -444,7 +442,7 @@ void FGAirport::processThreshold(SGPropertyNode* aThreshold)
   // first, let's identify the current runway
   string id(aThreshold->getStringValue("rwy"));
   if (!hasRunwayWithIdent(id)) {
-    SG_LOG(SG_GENERAL, SG_WARN, "FGAirport::processThreshold: "
+    SG_LOG(SG_GENERAL, SG_DEBUG, "FGAirport::processThreshold: "
       "found runway not defined in the global data:" << ident() << "/" << id);
     return;
   }