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 /unoxml | |
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 'unoxml')
-rw-r--r-- | unoxml/source/dom/document.cxx | 2 | ||||
-rw-r--r-- | unoxml/source/dom/elementlist.cxx | 2 | ||||
-rw-r--r-- | unoxml/source/dom/node.cxx | 2 | ||||
-rw-r--r-- | unoxml/source/events/eventdispatcher.cxx | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx index 85cfdcc4e8a2..cd5dda474c22 100644 --- a/unoxml/source/dom/document.cxx +++ b/unoxml/source/dom/document.cxx @@ -942,7 +942,7 @@ namespace DOM if (nullptr == m_aNodePtr) { return nullptr; } - xmlDocPtr const pClone(xmlCopyDoc(m_aDocPtr, (bDeep) ? 1 : 0)); + xmlDocPtr const pClone(xmlCopyDoc(m_aDocPtr, bDeep ? 1 : 0)); if (nullptr == pClone) { return nullptr; } Reference< XNode > const xRet( static_cast<CNode*>(CDocument::CreateCDocument(pClone).get())); diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx index 7634a6e07d92..01cf55720b78 100644 --- a/unoxml/source/dom/elementlist.cxx +++ b/unoxml/source/dom/elementlist.cxx @@ -82,7 +82,7 @@ namespace DOM : m_pElement(pElement) , m_rMutex(rMutex) , m_pName(lcl_initXmlString(rName)) - , m_pURI((pURI) ? lcl_initXmlString(*pURI) : nullptr) + , m_pURI(pURI ? lcl_initXmlString(*pURI) : nullptr) , m_bRebuild(true) { } diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx index 7a32acb59b45..1508ea80a23f 100644 --- a/unoxml/source/dom/node.cxx +++ b/unoxml/source/dom/node.cxx @@ -393,7 +393,7 @@ namespace DOM return nullptr; } ::rtl::Reference<CNode> const pNode = GetOwnerDocument().GetCNode( - xmlCopyNode(m_aNodePtr, (bDeep) ? 1 : 0)); + xmlCopyNode(m_aNodePtr, bDeep ? 1 : 0)); if (!pNode.is()) { return nullptr; } pNode->m_bUnlinked = true; // not linked yet return pNode.get(); diff --git a/unoxml/source/events/eventdispatcher.cxx b/unoxml/source/events/eventdispatcher.cxx index 51572eea5e99..27a394940233 100644 --- a/unoxml/source/events/eventdispatcher.cxx +++ b/unoxml/source/events/eventdispatcher.cxx @@ -36,7 +36,7 @@ namespace DOM { namespace events { void CEventDispatcher::addListener(xmlNodePtr pNode, const OUString& aType, const Reference<XEventListener>& aListener, bool bCapture) { - TypeListenerMap *const pTMap = (bCapture) + TypeListenerMap *const pTMap = bCapture ? (& m_CaptureListeners) : (& m_TargetListeners); // get the multimap for the specified type @@ -55,7 +55,7 @@ namespace DOM { namespace events { void CEventDispatcher::removeListener(xmlNodePtr pNode, const OUString& aType, const Reference<XEventListener>& aListener, bool bCapture) { - TypeListenerMap *const pTMap = (bCapture) + TypeListenerMap *const pTMap = bCapture ? (& m_CaptureListeners) : (& m_TargetListeners); // get the multimap for the specified type |