]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/thread.cpp
fix memory leak (coverity checker CID 53)
[wxWidgets.git] / src / msw / thread.cpp
index 615451a3f5fdc3672a41775927999f344aed79fa..30484e2c86debec6b7df855ac32cc054ffcfc4dc 100644 (file)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "thread.h"
-#endif
-
 // ----------------------------------------------------------------------------
 // headers
 // ----------------------------------------------------------------------------
@@ -888,10 +884,9 @@ unsigned long wxThread::GetCurrentId()
     return (unsigned long)::GetCurrentThreadId();
 }
 
-bool wxThread::SetConcurrency(size_t level)
+bool wxThread::SetConcurrency(size_t WXUNUSED_IN_WINCE(level))
 {
 #ifdef __WXWINCE__
-    wxUnusedVar(level);
     return false;
 #else
     wxASSERT_MSG( IsMain(), _T("should only be called from the main thread") );
@@ -930,7 +925,7 @@ bool wxThread::SetConcurrency(size_t level)
             dwProcMask |= bit;
 
             // another process added
-            if ( !--level )
+            if ( --level == 0 )
             {
                 // and that's enough
                 break;