diff --git a/src/AIModel/AIBase.cxx b/src/AIModel/AIBase.cxx index b5459a38f..ce3968b90 100644 --- a/src/AIModel/AIBase.cxx +++ b/src/AIModel/AIBase.cxx @@ -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() ); } diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 2215fd295..8dcefe3d1 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -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(); diff --git a/src/Traffic/TrafficMgr.cxx b/src/Traffic/TrafficMgr.cxx index ca663a8d2..9e6dded35 100644 --- a/src/Traffic/TrafficMgr.cxx +++ b/src/Traffic/TrafficMgr.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -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; }