summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdmark.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-11-22 14:12:34 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-11-22 19:16:52 +0100
commit72ef2b5d9802c424dbb0810e0a72fae50d92b678 (patch)
treec043fd16189d55fcc549589cecf145bb522089e6 /svx/source/svdraw/svdmark.cxx
parentb140f92531396c1087b997852d7ece18429b79d1 (diff)
Make loplugin:unnecessaryparen warn about (x) ? ... : ... after all
...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in <https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx/source/svdraw/svdmark.cxx')
-rw-r--r--svx/source/svdraw/svdmark.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index 55e8c175fb41..faf855bc96a4 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -123,16 +123,16 @@ static bool ImpSdrMarkListSorter(SdrMark* const& lhs, SdrMark* const& rhs)
{
SdrObject* pObj1 = lhs->GetMarkedSdrObj();
SdrObject* pObj2 = rhs->GetMarkedSdrObj();
- SdrObjList* pOL1 = (pObj1) ? pObj1->GetObjList() : nullptr;
- SdrObjList* pOL2 = (pObj2) ? pObj2->GetObjList() : nullptr;
+ SdrObjList* pOL1 = pObj1 ? pObj1->GetObjList() : nullptr;
+ SdrObjList* pOL2 = pObj2 ? pObj2->GetObjList() : nullptr;
if (pOL1 == pOL2)
{
// AF: Note that I reverted a change from sal_uInt32 to sal_uLong (made
// for 64bit compliance, #i78198#) because internally in SdrObject
// both nOrdNum and mnNavigationPosition are stored as sal_uInt32.
- sal_uInt32 nObjOrd1((pObj1) ? pObj1->GetNavigationPosition() : 0);
- sal_uInt32 nObjOrd2((pObj2) ? pObj2->GetNavigationPosition() : 0);
+ sal_uInt32 nObjOrd1(pObj1 ? pObj1->GetNavigationPosition() : 0);
+ sal_uInt32 nObjOrd2(pObj2 ? pObj2->GetNavigationPosition() : 0);
return nObjOrd1 < nObjOrd2;
}