]> git.mxchange.org Git - simgear.git/blobdiff - simgear/structure/commands.cxx
Boolean uniforms are now updatable by properties
[simgear.git] / simgear / structure / commands.cxx
index 6f6db1c661bad0544adb28150c0e946b22684a0c..6b4b11ea189a2cc35199f4a5b43c4032a7e10d3f 100644 (file)
 #include <memory>
 #include <simgear/props/props_io.hxx>
 
-#include <OpenThreads/Mutex>
-#include <OpenThreads/ScopedLock>
-
 #include "commands.hxx"
 
 #include <simgear/math/SGMath.hxx>
 #include <simgear/structure/exception.hxx>
+#include <simgear/threads/SGThread.hxx>
+#include <simgear/threads/SGGuard.hxx>
 #include <simgear/debug/logstream.hxx>
 
 \f
@@ -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<OpenThreads::Mutex> lock(_instanceMutex);
+  SGGuard<SGMutex> lock(_instanceMutex);
   if (mgr.get())
     return mgr.get();
 
@@ -74,7 +73,7 @@ SGCommandMgr::getCommandNames () const
   command_map::const_iterator last = _commands.end();
   while (it != last) {
     names.push_back(it->first);
-    it++;
+    ++it;
   }
   return names;
 }
@@ -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) {