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 /include | |
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 'include')
-rw-r--r-- | include/osl/file.hxx | 2 | ||||
-rw-r--r-- | include/vcl/button.hxx | 4 | ||||
-rw-r--r-- | include/vcl/toolbox.hxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/osl/file.hxx b/include/osl/file.hxx index a5823fbe1174..3c2848eaa590 100644 --- a/include/osl/file.hxx +++ b/include/osl/file.hxx @@ -1906,7 +1906,7 @@ public: { return static_cast< RC >(osl_createDirectoryPath( aDirectoryUrl.pData, - (aDirectoryCreationObserver) ? onDirectoryCreated : NULL, + aDirectoryCreationObserver ? onDirectoryCreated : NULL, aDirectoryCreationObserver)); } }; diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 60a2aaff7249..3a4159d35392 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -202,7 +202,7 @@ private: inline void PushButton::Check( bool bCheck ) { - SetState( (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE ); + SetState( bCheck ? TRISTATE_TRUE : TRISTATE_FALSE ); } inline bool PushButton::IsChecked() const @@ -474,7 +474,7 @@ public: inline void CheckBox::Check( bool bCheck ) { - SetState( (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE ); + SetState( bCheck ? TRISTATE_TRUE : TRISTATE_FALSE ); } inline bool CheckBox::IsChecked() const diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index 6a936d8e03fa..e6d213027e60 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -518,7 +518,7 @@ public: inline void ToolBox::CheckItem( sal_uInt16 nItemId, bool bCheck ) { - SetItemState( nItemId, (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE ); + SetItemState( nItemId, bCheck ? TRISTATE_TRUE : TRISTATE_FALSE ); } inline bool ToolBox::IsItemChecked( sal_uInt16 nItemId ) const |