X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2Fcommands.cxx;h=266cdb4ce3b0177b269e102295647a32515b262e;hb=229837b14c8c31ec5d7c920e3c4dc7cba58e2419;hp=fd67ae4fc3edebac035ca0f5cf02ea86a48853fd;hpb=ce71b8c1cf761742ab88975442f4037b5e460114;p=simgear.git diff --git a/simgear/structure/commands.cxx b/simgear/structure/commands.cxx index fd67ae4f..266cdb4c 100644 --- a/simgear/structure/commands.cxx +++ b/simgear/structure/commands.cxx @@ -11,13 +11,11 @@ #include #include -#include -#include - #include "commands.hxx" -#include #include +#include +#include #include @@ -36,7 +34,7 @@ SGCommandMgr::~SGCommandMgr () // no-op } -OpenThreads::Mutex SGCommandMgr::_instanceMutex; +SGMutex SGCommandMgr::_instanceMutex; SGCommandMgr* SGCommandMgr::instance() @@ -45,7 +43,7 @@ SGCommandMgr::instance() if (mgr.get()) return mgr.get(); - OpenThreads::ScopedLock lock(_instanceMutex); + SGGuard lock(_instanceMutex); if (mgr.get()) return mgr.get(); @@ -85,8 +83,8 @@ SGCommandMgr::execute (const std::string &name, const SGPropertyNode * arg) cons command_t command = getCommand(name); if (command == 0) return false; - - + + try { return (*command)(arg); } catch (sg_exception& e) {