[Libreoffice] [PUSHED] Re: Duplicate expression in vcl/win/source/app/salinst.cxx

julien2412 serval2412 at yahoo.fr
Mon Jan 30 10:03:53 PST 2012


Commited and pushed on master.

Now it's :
bool WinSalInstance::CheckYieldMutex()
{
    bool bRet = true;
    SalData*    pSalData = GetSalData();
    DWORD       nCurThreadId = GetCurrentThreadId();
    if ( pSalData->mpFirstInstance )
    {
        SalYieldMutex* pYieldMutex =
pSalData->mpFirstInstance->mpSalYieldMutex;
        bRet = (pYieldMutex->mnThreadId == nCurThreadId);
    }
    return bRet;
}

I wonder if we could more simplify like this :
bool WinSalInstance::CheckYieldMutex()
{
    bool bRet = true;
    SalData*    pSalData = GetSalData();
    if ( pSalData->mpFirstInstance )
    {
        SalYieldMutex* pYieldMutex =
pSalData->mpFirstInstance->mpSalYieldMutex;
        bRet = (pYieldMutex->mnThreadId == (GetCurrentThreadId()))
    }
    return bRet;
}

Anyway, thank you Michael !


--
View this message in context: http://nabble.documentfoundation.org/Duplicate-expression-in-vcl-win-source-app-salinst-cxx-tp3695749p3700758.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list