]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/xmlloader.cxx
Interim windows build fix
[flightgear.git] / src / Airports / xmlloader.cxx
index f30e169c77c9a34a31d023df739b2f141af149b4..cdd36271437846b9cff945ead136771715e2a51b 100644 (file)
@@ -17,6 +17,8 @@
 #  include "config.h"
 #endif
 
+#include <cstdio>
+
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/xml/easyxml.hxx>
 #include <simgear/misc/strutils.hxx>
@@ -30,7 +32,7 @@
 #include "runwayprefloader.hxx"
 
 #include "dynamics.hxx"
-#include "simple.hxx"
+#include "airport.hxx"
 #include "runwayprefs.hxx"
 
 #include <Navaids/NavDataCache.hxx>
@@ -47,25 +49,12 @@ void XMLLoader::load(FGAirportDynamics* d)
     return;
   }
 
-  flightgear::NavDataCache* cache = flightgear::NavDataCache::instance();
-  if (!cache->isCachedFileModified(path)) {
-    return;
-  }
-  
   SG_LOG(SG_NAVAID, SG_INFO, "reading groundnet data from " << path);
   SGTimeStamp t;
+  t.stamp();
   try {
-    flightgear::NavDataCache::Transaction txn(cache);
-    t.stamp();
-    {
-      // drop all current data
-      cache->dropGroundnetFor(d->parent()->guid());
-      
       FGAirportDynamicsXMLLoader visitor(d);
       readXML(path.str(), visitor);
-    } // ensure visitor is destroyed so its destructor runs
-    cache->stampCacheFile(path);
-    txn.commit();
   } catch (sg_exception& e) {
     SG_LOG(SG_NAVAID, SG_INFO, "parsing groundnet XML failed:" << e.getFormattedMessage());
   }