[Libreoffice-commits] .: vcl/win

Julien Nabet serval2412 at kemper.freedesktop.org
Mon Jan 30 10:01:16 PST 2012


 vcl/win/source/app/salinst.cxx |   23 +++--------------------
 1 file changed, 3 insertions(+), 20 deletions(-)

New commits:
commit 6c779863bbd25499f4c7dff7d201403ebef898be
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Jan 30 19:00:00 2012 +0100

    Fix "Found duplicate branches for if and else"

diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index bf1b89f..196b013 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -332,27 +332,10 @@ bool WinSalInstance::CheckYieldMutex()
     bool bRet = true;
     SalData*    pSalData = GetSalData();
     DWORD       nCurThreadId = GetCurrentThreadId();
-    if ( pSalData->mnAppThreadId != nCurThreadId )
-    {
-        if ( pSalData->mpFirstInstance )
-        {
-            SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex;
-            if ( pYieldMutex->mnThreadId != nCurThreadId )
-            {
-                bRet = false;
-            }
-        }
-    }
-    else
+    if ( pSalData->mpFirstInstance )
     {
-        if ( pSalData->mpFirstInstance )
-        {
-            SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex;
-            if ( pYieldMutex->mnThreadId != nCurThreadId )
-            {
-                bRet = false;
-            }
-        }
+        SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex;
+        bRet = (pYieldMutex->mnThreadId == nCurThreadId);
     }
     return bRet;
 }


More information about the Libreoffice-commits mailing list