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 /cui | |
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 'cui')
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 4e16c3f74db3..d724ecacc61d 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -505,7 +505,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) delete pNumFmtShell; // delete old shell if applicable (== reset) - nInitFormat = ( pValFmtAttr ) // memorize init key + nInitFormat = pValFmtAttr // memorize init key ? pValFmtAttr->GetValue() // (for FillItemSet()) : ULONG_MAX; // == DONT_KNOW @@ -513,13 +513,13 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) if ( eValType == SvxNumberValueType::String ) pNumFmtShell =SvxNumberFormatShell::Create( pNumItem->GetNumberFormatter(), - (pValFmtAttr) ? nInitFormat : 0, + pValFmtAttr ? nInitFormat : 0, eValType, aValString ); else pNumFmtShell =SvxNumberFormatShell::Create( pNumItem->GetNumberFormatter(), - (pValFmtAttr) ? nInitFormat : 0, + pValFmtAttr ? nInitFormat : 0, eValType, nValDouble, &aValString ); |