]> git.mxchange.org Git - flightgear.git/commitdiff
Durk Talsma:
authorehofman <ehofman>
Mon, 27 Dec 2004 17:35:22 +0000 (17:35 +0000)
committerehofman <ehofman>
Mon, 27 Dec 2004 17:35:22 +0000 (17:35 +0000)
Fix a couple of places that were not yet using SGPath

src/AIModel/AIBase.cxx
src/Main/fg_init.cxx
src/Traffic/TrafficMgr.cxx

index b5459a38f2ffd8245a56ce7b29acb91ab0b5a63e..ce3968b90c17483904eb5c2aff04cd534debb2c8 100644 (file)
@@ -137,7 +137,7 @@ bool FGAIBase::init() {
 
    if (model_path != "") {
       model = load3DModel( globals->get_fg_root(),
-                            model_path.c_str(),
+                            SGPath(model_path).c_str(),
                              props,
                             globals->get_sim_time_sec() );
    }
index 2215fd2957882d770aa1214a80ce260064169cb4..8dcefe3d11296b6796423667569fa6a496538f98 100644 (file)
@@ -1709,8 +1709,9 @@ bool fgInitSubsystems() {
      globals->add_subsystem("Traffic Manager", new FGTrafficManager);
             FGTrafficManager *dispatcher = 
             (FGTrafficManager*) globals->get_subsystem("Traffic Manager");
-
-     readXML(string(globals->get_fg_root() + string("/Traffic/fgtraffic.xml")),
+            SGPath path =globals->get_fg_root();
+            path.append("Traffic/fgtraffic.xml");
+     readXML(path.str(),
             *dispatcher);
      globals->get_subsystem("Traffic Manager")->init();
 
index ca663a8d2b00153c6d8902c4482f49182a437428..9e6dded35b48ab3e2954a262b96507f373207f6a 100644 (file)
@@ -47,6 +47,7 @@
 #include <simgear/compiler.h>
 #include <simgear/math/polar3d.hxx>
 #include <simgear/math/sg_geodesy.hxx>
+#include <simgear/misc/sg_path.hxx>
 #include <simgear/props/props.hxx>
 #include <simgear/route/waypoint.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
@@ -127,11 +128,11 @@ void  FGTrafficManager::startElement (const char * name, const XMLAttributes &at
   if (attval != 0)
       {
        //cout << "including " << attval << endl;
-       string path = 
-         globals->get_fg_root()   + 
-         string("/Traffic/")      + 
-         string(attval);
-       readXML(path, *this);
+       SGPath path = 
+         globals->get_fg_root();
+       path.append("/Traffic/");
+       path.append(attval);
+       readXML(path.str(), *this);
       }
   //  cout << "  " << atts.getName(i) << '=' << atts.getValue(i) << endl; 
 }