cosmetics
authorLars Op den Kamp <lars@opdenkamp.eu>
Mon, 23 Apr 2012 09:18:45 +0000 (11:18 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Mon, 23 Apr 2012 12:06:31 +0000 (14:06 +0200)
src/lib/platform/threads/threads.h

index b5ccf3850815845b1d37e458ab163fcd78e62f93..0cc07eee883f6646e98bd65b6cfb601f5d8c1c96 100644 (file)
@@ -91,18 +91,18 @@ namespace PLATFORM
 
     virtual bool CreateThread(bool bWait = true)
     {
-        bool bReturn(false);
-        CLockObject lock(m_threadMutex);
-        if (!IsRunning())
+      bool bReturn(false);
+      CLockObject lock(m_threadMutex);
+      if (!IsRunning())
+      {
+        m_bStop = false;
+        if (ThreadsCreate(m_thread, CThread::ThreadHandler, ((void*)static_cast<CThread *>(this))))
         {
-          m_bStop = false;
-          if (ThreadsCreate(m_thread, CThread::ThreadHandler, ((void*)static_cast<CThread *>(this))))
-          {
-            if (bWait)
-              m_threadCondition.Wait(m_threadMutex, m_bRunning);
-            bReturn = true;
-          }
+          if (bWait)
+            m_threadCondition.Wait(m_threadMutex, m_bRunning);
+          bReturn = true;
         }
+      }
       return bReturn;
     }