X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2Fcommands.cxx;h=6b4b11ea189a2cc35199f4a5b43c4032a7e10d3f;hb=1a835a2e1b06ac4eb87fc1c72175cf54728b3fb3;hp=fd67ae4fc3edebac035ca0f5cf02ea86a48853fd;hpb=29c8c9f989ed1201de106b9f42801e60ea1a07d5;p=simgear.git diff --git a/simgear/structure/commands.cxx b/simgear/structure/commands.cxx index fd67ae4f..6b4b11ea 100644 --- a/simgear/structure/commands.cxx +++ b/simgear/structure/commands.cxx @@ -11,13 +11,12 @@ #include #include -#include -#include - #include "commands.hxx" #include #include +#include +#include #include @@ -36,7 +35,7 @@ SGCommandMgr::~SGCommandMgr () // no-op } -OpenThreads::Mutex SGCommandMgr::_instanceMutex; +SGMutex SGCommandMgr::_instanceMutex; SGCommandMgr* SGCommandMgr::instance() @@ -45,7 +44,7 @@ SGCommandMgr::instance() if (mgr.get()) return mgr.get(); - OpenThreads::ScopedLock lock(_instanceMutex); + SGGuard lock(_instanceMutex); if (mgr.get()) return mgr.get(); @@ -85,8 +84,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) {