diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-06 10:47:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-12 10:11:34 +0200 |
commit | 992a33313046f4a4d322db9464c474e7429a019a (patch) | |
tree | 494143e3070af872027ecaca840516d3101a881c /sal/osl/unx/profile.cxx | |
parent | 77c1431ee88ab04a9ff48b849acedee6d455bafb (diff) |
clang-tidy: readability-else-after-return
run it against sal,cppu,cppuhelper
I had to run this multiple times to catch all the cases in each module,
and it requires some hand-tweaking of the resulting output - clang-tidy
is not very good about cleaning up trailing spaces, and aligning
things nicely.
Change-Id: I00336345f5f036e12422b98d66526509380c497a
Reviewed-on: https://gerrit.libreoffice.org/36194
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/osl/unx/profile.cxx')
-rw-r--r-- | sal/osl/unx/profile.cxx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index 17bf399bde8e..a979c7b8e71b 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -1842,20 +1842,18 @@ static bool releaseProfile(osl_TProfileImpl* pProfile) { return osl_closeProfile(static_cast<oslProfile>(pProfile)); } - else + + if (! (pProfile->m_Flags & (osl_Profile_READLOCK | osl_Profile_WRITELOCK | osl_Profile_FLUSHWRITE ))) { - if (! (pProfile->m_Flags & (osl_Profile_READLOCK | osl_Profile_WRITELOCK | osl_Profile_FLUSHWRITE ))) + if (pProfile->m_Flags & FLG_MODIFIED) { - if (pProfile->m_Flags & FLG_MODIFIED) - { - bool bRet = storeProfile(pProfile, false); - SAL_WARN_IF(!bRet, "sal.osl", "storeProfile(pProfile, false) ==> false"); - (void)bRet; - } - - closeFileImpl(pProfile->m_pFile,pProfile->m_Flags); - pProfile->m_pFile = nullptr; + bool bRet = storeProfile(pProfile, false); + SAL_WARN_IF(!bRet, "sal.osl", "storeProfile(pProfile, false) ==> false"); + (void)bRet; } + + closeFileImpl(pProfile->m_pFile,pProfile->m_Flags); + pProfile->m_pFile = nullptr; } return true; |