diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-11-22 14:12:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-11-22 19:16:52 +0100 |
commit | 72ef2b5d9802c424dbb0810e0a72fae50d92b678 (patch) | |
tree | c043fd16189d55fcc549589cecf145bb522089e6 /vcl | |
parent | b140f92531396c1087b997852d7ece18429b79d1 (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 'vcl')
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/print/genprnpsp.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index fd8c2a1bb480..b94acb97f6dc 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -585,8 +585,8 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) ImplTabItem* pOldItem = ImplGetItem( nOldId ); ImplTabItem* pItem = ImplGetItem( nId ); - TabPage* pOldPage = (pOldItem) ? pOldItem->mpTabPage.get() : nullptr; - TabPage* pPage = (pItem) ? pItem->mpTabPage.get() : nullptr; + TabPage* pOldPage = pOldItem ? pOldItem->mpTabPage.get() : nullptr; + TabPage* pPage = pItem ? pItem->mpTabPage.get() : nullptr; vcl::Window* pCtrlParent = GetParent(); if ( IsReallyVisible() && IsUpdateMode() ) diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx index f13f62b39ff2..51b23dcb4a2d 100644 --- a/vcl/unx/generic/print/genprnpsp.cxx +++ b/vcl/unx/generic/print/genprnpsp.cxx @@ -1243,9 +1243,9 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo } // job has been spooled - i_rController.setJobState( (bAborted) + i_rController.setJobState( bAborted ? view::PrintableState_JOB_ABORTED - : ((bSuccess) ? view::PrintableState_JOB_SPOOLED + : (bSuccess ? view::PrintableState_JOB_SPOOLED : view::PrintableState_JOB_SPOOLING_FAILED)); // clean up the temporary PDF files |