diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-16 15:23:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-17 08:25:47 +0200 |
commit | ccb2a1f650bc505f8a4f1abebf8ce4f9396562a8 (patch) | |
tree | 2ee2fd4f300ae95cf23bade1f242e02f9b276c07 /unoxml/source | |
parent | da5c3a1ee43dd1a07cbd1b8005488bf05432593d (diff) |
clang-tidy readability-redundant-smartptr-get
redundant get() call on smart pointer
Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd
Reviewed-on: https://gerrit.libreoffice.org/61837
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoxml/source')
-rw-r--r-- | unoxml/source/dom/attr.cxx | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx index b1124549878e..22f214dbf384 100644 --- a/unoxml/source/dom/attr.cxx +++ b/unoxml/source/dom/attr.cxx @@ -47,7 +47,8 @@ namespace DOM xmlNsPtr CAttr::GetNamespace(xmlNodePtr const pNode) { - if (!m_pNamespace.get()) { + if (!m_pNamespace) + { return nullptr; } xmlChar const*const pUri(reinterpret_cast<xmlChar const*>( @@ -217,11 +218,14 @@ namespace DOM if (!m_aNodePtr) { return; } - if (m_pNamespace.get()) { + if (m_pNamespace) + { OSL_ASSERT(!m_aNodePtr->parent); m_pNamespace->second = OUStringToOString(prefix, RTL_TEXTENCODING_UTF8); - } else { + } + else + { CNode::setPrefix(prefix); } } @@ -232,12 +236,15 @@ namespace DOM if (!m_aNodePtr) { return OUString(); } - if (m_pNamespace.get()) { + if (m_pNamespace) + { OSL_ASSERT(!m_aNodePtr->parent); OUString const ret(OStringToOUString( m_pNamespace->second, RTL_TEXTENCODING_UTF8)); return ret; - } else { + } + else + { return CNode::getPrefix(); } } @@ -248,12 +255,15 @@ namespace DOM if (!m_aNodePtr) { return OUString(); } - if (m_pNamespace.get()) { + if (m_pNamespace) + { OSL_ASSERT(!m_aNodePtr->parent); OUString const ret(OStringToOUString( m_pNamespace->first, RTL_TEXTENCODING_UTF8)); return ret; - } else { + } + else + { return CNode::getNamespaceURI(); } } |