X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FSystems%2Fsystem_mgr.cxx;h=4936ea63818fec9a43fe5ceaac56d9fb75ff18ed;hb=91976472206ba8319cc41cd3ff468fec04a52a78;hp=da2917dae9a0e4fcebeadce846f445233f3ae36f;hpb=940d1aa8df3a358d181f3cba36d505c516c930bd;p=flightgear.git diff --git a/src/Systems/system_mgr.cxx b/src/Systems/system_mgr.cxx index da2917dae..4936ea638 100644 --- a/src/Systems/system_mgr.cxx +++ b/src/Systems/system_mgr.cxx @@ -3,9 +3,14 @@ // // This file is in the Public Domain and comes with no warranty. +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include +#include #include
#include
@@ -24,7 +29,7 @@ FGSystemMgr::FGSystemMgr () { - config_props = new SGPropertyNode; + SGPropertyNode_ptr config_props = new SGPropertyNode; SGPropertyNode *path_n = fgGetNode("/sim/systems/path"); @@ -37,7 +42,7 @@ FGSystemMgr::FGSystemMgr () try { readProperties( config.str(), config_props ); - if ( build() ) { + if ( build(config_props) ) { enabled = true; } else { SG_LOG( SG_ALL, SG_ALERT, @@ -48,7 +53,7 @@ FGSystemMgr::FGSystemMgr () " details."); exit(-1); } - } catch (const sg_exception& exc) { + } catch (const sg_exception&) { SG_LOG( SG_ALL, SG_ALERT, "Failed to load systems system model: " << config.str() ); } @@ -58,14 +63,13 @@ FGSystemMgr::FGSystemMgr () "No systems model specified for this model!"); } - delete config_props; } FGSystemMgr::~FGSystemMgr () { } -bool FGSystemMgr::build () +bool FGSystemMgr::build (SGPropertyNode* config_props) { SGPropertyNode *node; int i;