[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Fri Feb 3 21:37:22 UTC 2017


 sw/source/core/doc/docbm.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit ad2935eee6640a5ee09d0b21c7c1f83dbfcd4c58
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 3 22:36:42 2017 +0100

    loplugin:simplifybool
    
    Change-Id: If9d73319988b9d6ac5fcdee2ec815738320a62a0

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 0219fd0..dccb6ff 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -90,9 +90,11 @@ namespace
         }
         auto *const pCRFirst (dynamic_cast<::sw::mark::CrossRefBookmark const*>(rpFirst.get()));
         auto *const pCRSecond(dynamic_cast<::sw::mark::CrossRefBookmark const*>(rpSecond.get()));
-        return ((pCRFirst == nullptr) == (pCRSecond == nullptr))
-                ? false // equal
-                : (pCRFirst != nullptr); // cross-ref sorts *before*
+        if ((pCRFirst == nullptr) == (pCRSecond == nullptr))
+        {
+            return false; // equal
+        }
+        return pCRFirst != nullptr; // cross-ref sorts *before*
     }
 
     bool lcl_MarkOrderingByEnd(const IDocumentMarkAccess::pMark_t& rpFirst,


More information about the Libreoffice-commits mailing list