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 /dbaccess | |
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 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/app/AppSwapWindow.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index ae9391900db0..8e3149711e57 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -129,7 +129,7 @@ bool OApplicationSwapWindow::interceptKeyInput( const KeyEvent& _rEvent ) ElementType OApplicationSwapWindow::getElementType() const { SvxIconChoiceCtrlEntry* pEntry = m_aIconControl->GetSelectedEntry(); - return ( pEntry ) ? *static_cast<ElementType*>(pEntry->GetUserData()) : E_NONE; + return pEntry ? *static_cast<ElementType*>(pEntry->GetUserData()) : E_NONE; } bool OApplicationSwapWindow::onContainerSelected( ElementType _eType ) diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 598e01c2d783..00c2eaf5dddf 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1383,7 +1383,7 @@ bool insertHierachyElement( vcl::Window* _pParent, const Reference< XComponentCo {"Parent", uno::Any(xNameAccess)}, {PROPERTY_EMBEDDEDOBJECT, uno::Any(_xContent)}, })); - OUString sServiceName(_bCollection ? ((_bForm) ? OUString(SERVICE_NAME_FORM_COLLECTION) : OUString(SERVICE_NAME_REPORT_COLLECTION)) : OUString(SERVICE_SDB_DOCUMENTDEFINITION)); + OUString sServiceName(_bCollection ? (_bForm ? OUString(SERVICE_NAME_FORM_COLLECTION) : OUString(SERVICE_NAME_REPORT_COLLECTION)) : OUString(SERVICE_SDB_DOCUMENTDEFINITION)); Reference<XContent > xNew( xORB->createInstanceWithArguments( sServiceName, aArguments ), UNO_QUERY_THROW ); Reference< XNameContainer > xNameContainer( xNameAccess, UNO_QUERY_THROW ); |