summaryrefslogtreecommitdiff
path: root/unoxml
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-27 10:11:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-27 13:06:01 +0200
commit9de4cafcf0efdc2986c3130658ee9233df392773 (patch)
treef1077dc79632c9dcc48f7895d3e30b6ec1334f97 /unoxml
parent5938687e5764ee50759374b54d2bb1cf0e0d59d3 (diff)
clang-tidy modernize-pass-by-value in unoxml
Change-Id: Id0df30bed0de7db0564816180497406c55cf9fff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136476 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/source/dom/attributesmap.cxx5
-rw-r--r--unoxml/source/dom/attributesmap.hxx2
-rw-r--r--unoxml/source/dom/childlist.cxx5
-rw-r--r--unoxml/source/dom/childlist.hxx2
-rw-r--r--unoxml/source/dom/elementlist.cxx5
-rw-r--r--unoxml/source/dom/elementlist.hxx2
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx59
-rw-r--r--unoxml/source/xpath/nodelist.cxx6
-rw-r--r--unoxml/source/xpath/nodelist.hxx2
-rw-r--r--unoxml/source/xpath/xpathobject.cxx6
-rw-r--r--unoxml/source/xpath/xpathobject.hxx2
11 files changed, 52 insertions, 44 deletions
diff --git a/unoxml/source/dom/attributesmap.cxx b/unoxml/source/dom/attributesmap.cxx
index 575fa96c2ce0..b11dcc6a1e01 100644
--- a/unoxml/source/dom/attributesmap.cxx
+++ b/unoxml/source/dom/attributesmap.cxx
@@ -22,6 +22,7 @@
#include <string.h>
#include <com/sun/star/xml/dom/DOMException.hpp>
+#include <utility>
#include "element.hxx"
#include "document.hxx"
@@ -31,9 +32,9 @@ using namespace css::xml::dom;
namespace DOM
{
- CAttributesMap::CAttributesMap(::rtl::Reference<CElement> const& pElement,
+ CAttributesMap::CAttributesMap(::rtl::Reference<CElement> pElement,
::osl::Mutex & rMutex)
- : m_pElement(pElement)
+ : m_pElement(std::move(pElement))
, m_rMutex(rMutex)
{
}
diff --git a/unoxml/source/dom/attributesmap.hxx b/unoxml/source/dom/attributesmap.hxx
index 55f4c6795194..994cd72b0a1e 100644
--- a/unoxml/source/dom/attributesmap.hxx
+++ b/unoxml/source/dom/attributesmap.hxx
@@ -42,7 +42,7 @@ namespace DOM
::osl::Mutex & m_rMutex;
public:
- CAttributesMap(::rtl::Reference<CElement> const& pElement,
+ CAttributesMap(::rtl::Reference<CElement> pElement,
::osl::Mutex & rMutex);
/**
diff --git a/unoxml/source/dom/childlist.cxx b/unoxml/source/dom/childlist.cxx
index 6f62f0144dbb..c147d8622dc4 100644
--- a/unoxml/source/dom/childlist.cxx
+++ b/unoxml/source/dom/childlist.cxx
@@ -22,6 +22,7 @@
#include <libxml/tree.h>
#include <node.hxx>
+#include <utility>
#include "document.hxx"
using namespace css::uno;
@@ -29,9 +30,9 @@ using namespace css::xml::dom;
namespace DOM
{
- CChildList::CChildList(::rtl::Reference<CNode> const& pBase,
+ CChildList::CChildList(::rtl::Reference<CNode> pBase,
::osl::Mutex & rMutex)
- : m_pNode(pBase)
+ : m_pNode(std::move(pBase))
, m_rMutex(rMutex)
{
}
diff --git a/unoxml/source/dom/childlist.hxx b/unoxml/source/dom/childlist.hxx
index 091a8e450837..89fd0ea9bbda 100644
--- a/unoxml/source/dom/childlist.hxx
+++ b/unoxml/source/dom/childlist.hxx
@@ -42,7 +42,7 @@ namespace DOM
::osl::Mutex & m_rMutex;
public:
- CChildList(::rtl::Reference<CNode> const& pBase,
+ CChildList(::rtl::Reference<CNode> pBase,
::osl::Mutex & rMutex);
/**
diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx
index c8fc604377de..0f2605afe8c3 100644
--- a/unoxml/source/dom/elementlist.cxx
+++ b/unoxml/source/dom/elementlist.cxx
@@ -24,6 +24,7 @@
#include <cppuhelper/implbase.hxx>
#include <o3tl/safeint.hxx>
+#include <utility>
#include <tools/diagnose_ex.h>
#include "element.hxx"
@@ -78,10 +79,10 @@ namespace DOM
}
}
- CElementListImpl::CElementListImpl(::rtl::Reference<CElement> const& pElement,
+ CElementListImpl::CElementListImpl(::rtl::Reference<CElement> pElement,
::osl::Mutex & rMutex,
std::u16string_view rName, OUString const*const pURI)
- : m_pElement(pElement)
+ : m_pElement(std::move(pElement))
, m_rMutex(rMutex)
, m_pName(lcl_initXmlString(rName))
, m_pURI(pURI ? lcl_initXmlString(*pURI) : nullptr)
diff --git a/unoxml/source/dom/elementlist.hxx b/unoxml/source/dom/elementlist.hxx
index 66ce3bedac18..092529282148 100644
--- a/unoxml/source/dom/elementlist.hxx
+++ b/unoxml/source/dom/elementlist.hxx
@@ -60,7 +60,7 @@ namespace DOM
void buildlist(xmlNodePtr pNode, bool start=true);
public:
- CElementListImpl(::rtl::Reference<CElement> const& pElement,
+ CElementListImpl(::rtl::Reference<CElement> pElement,
::osl::Mutex & rMutex,
std::u16string_view rName, OUString const*const pURI);
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index 51c8317f369f..ccf4d87ffedd 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -65,6 +65,7 @@
#include <comphelper/xmltools.hxx>
#include <com/sun/star/embed/XEncryptionProtectedSource2.hpp>
+#include <utility>
/**
Implementation of the service com.sun.star.rdf.Repository.
@@ -183,15 +184,15 @@ public:
struct URI : public Resource
{
OString const value;
- explicit URI(OString const& i_rValue)
- : value(i_rValue)
+ explicit URI(OString i_Value)
+ : value(std::move(i_Value))
{ }
};
struct BlankNode : public Resource
{
OString const value;
- explicit BlankNode(OString const& i_rValue)
- : value(i_rValue)
+ explicit BlankNode(OString i_Value)
+ : value(std::move(i_Value))
{ }
};
struct Literal : public Node
@@ -199,11 +200,11 @@ public:
OString const value;
OString const language;
::std::optional<OString> const type;
- Literal(OString const& i_rValue, OString const& i_rLanguage,
- ::std::optional<OString> const& i_rType)
- : value(i_rValue)
- , language(i_rLanguage)
- , type(i_rType)
+ Literal(OString i_rValue, OString i_Language,
+ ::std::optional<OString> i_Type)
+ : value(std::move(i_rValue))
+ , language(std::move(i_Language))
+ , type(std::move(i_Type))
{ }
};
struct Statement
@@ -211,19 +212,19 @@ public:
std::shared_ptr<Resource> const pSubject;
std::shared_ptr<URI> const pPredicate;
std::shared_ptr<Node> const pObject;
- Statement(std::shared_ptr<Resource> const& i_pSubject,
- std::shared_ptr<URI> const& i_pPredicate,
- std::shared_ptr<Node> const& i_pObject)
- : pSubject(i_pSubject)
- , pPredicate(i_pPredicate)
- , pObject(i_pObject)
+ Statement(std::shared_ptr<Resource> i_pSubject,
+ std::shared_ptr<URI> i_pPredicate,
+ std::shared_ptr<Node> i_pObject)
+ : pSubject(std::move(i_pSubject))
+ , pPredicate(std::move(i_pPredicate))
+ , pObject(std::move(i_pObject))
{ }
};
librdf_TypeConverter(
- uno::Reference< uno::XComponentContext > const & i_xContext,
+ uno::Reference< uno::XComponentContext > i_xContext,
librdf_Repository &i_rRep)
- : m_xContext(i_xContext)
+ : m_xContext(std::move(i_xContext))
, m_rRep(i_rRep)
{ };
@@ -429,15 +430,15 @@ public:
librdf_GraphResult(librdf_Repository *i_pRepository,
std::mutex & i_rMutex,
- std::shared_ptr<librdf_stream> const& i_pStream,
- std::shared_ptr<librdf_node> const& i_pContext,
- std::shared_ptr<librdf_query> const& i_pQuery =
+ std::shared_ptr<librdf_stream> i_pStream,
+ std::shared_ptr<librdf_node> i_pContext,
+ std::shared_ptr<librdf_query> i_pQuery =
std::shared_ptr<librdf_query>() )
: m_xRep(i_pRepository)
, m_rMutex(i_rMutex)
- , m_pQuery(i_pQuery)
- , m_pContext(i_pContext)
- , m_pStream(i_pStream)
+ , m_pQuery(std::move(i_pQuery))
+ , m_pContext(std::move(i_pContext))
+ , m_pStream(std::move(i_pStream))
{ };
virtual ~librdf_GraphResult() override
@@ -581,13 +582,13 @@ public:
librdf_QuerySelectResult(librdf_Repository *i_pRepository,
std::mutex & i_rMutex,
- std::shared_ptr<librdf_query> const& i_pQuery,
- std::shared_ptr<librdf_query_results> const& i_pQueryResult,
+ std::shared_ptr<librdf_query> i_pQuery,
+ std::shared_ptr<librdf_query_results> i_pQueryResult,
uno::Sequence< OUString > const& i_rBindingNames )
: m_xRep(i_pRepository)
, m_rMutex(i_rMutex)
- , m_pQuery(i_pQuery)
- , m_pQueryResult(i_pQueryResult)
+ , m_pQuery(std::move(i_pQuery))
+ , m_pQueryResult(std::move(i_pQueryResult))
, m_BindingNames(i_rBindingNames)
{ };
@@ -695,10 +696,10 @@ class librdf_NamedGraph:
{
public:
librdf_NamedGraph(librdf_Repository * i_pRep,
- uno::Reference<rdf::XURI> const & i_xName)
+ uno::Reference<rdf::XURI> i_xName)
: m_wRep(i_pRep)
, m_pRep(i_pRep)
- , m_xName(i_xName)
+ , m_xName(std::move(i_xName))
{ };
// css::rdf::XNode:
diff --git a/unoxml/source/xpath/nodelist.cxx b/unoxml/source/xpath/nodelist.cxx
index 1b306aabc8d7..b9e4e70c443a 100644
--- a/unoxml/source/xpath/nodelist.cxx
+++ b/unoxml/source/xpath/nodelist.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <utility>
+
#include "nodelist.hxx"
#include "../dom/document.hxx"
@@ -27,10 +29,10 @@ using namespace css::xml::dom;
namespace XPath
{
CNodeList::CNodeList(
- ::rtl::Reference<DOM::CDocument> const& pDocument,
+ ::rtl::Reference<DOM::CDocument> pDocument,
::osl::Mutex & rMutex,
std::shared_ptr<xmlXPathObject> const& rxpathObj)
- : m_pDocument(pDocument)
+ : m_pDocument(std::move(pDocument))
, m_rMutex(rMutex)
, m_pNodeSet(nullptr)
{
diff --git a/unoxml/source/xpath/nodelist.hxx b/unoxml/source/xpath/nodelist.hxx
index 689510dea540..2a8f70a6d82f 100644
--- a/unoxml/source/xpath/nodelist.hxx
+++ b/unoxml/source/xpath/nodelist.hxx
@@ -53,7 +53,7 @@ namespace XPath
public:
CNodeList(
- ::rtl::Reference<DOM::CDocument> const& pDocument,
+ ::rtl::Reference<DOM::CDocument> pDocument,
::osl::Mutex & rMutex,
std::shared_ptr<xmlXPathObject> const& rxpathObj);
/**
diff --git a/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx
index b71f8b80d5cf..037a097ae046 100644
--- a/unoxml/source/xpath/xpathobject.cxx
+++ b/unoxml/source/xpath/xpathobject.cxx
@@ -21,6 +21,8 @@
#include <string.h>
+#include <utility>
+
#include "../dom/document.hxx"
#include "nodelist.hxx"
@@ -60,10 +62,10 @@ namespace XPath
}
CXPathObject::CXPathObject(
- ::rtl::Reference<DOM::CDocument> const& pDocument,
+ ::rtl::Reference<DOM::CDocument> pDocument,
::osl::Mutex & rMutex,
std::shared_ptr<xmlXPathObject> const& pXPathObj)
- : m_pDocument(pDocument)
+ : m_pDocument(std::move(pDocument))
, m_rMutex(rMutex)
, m_pXPathObj(pXPathObj)
, m_XPathObjectType(lcl_GetType(pXPathObj.get()))
diff --git a/unoxml/source/xpath/xpathobject.hxx b/unoxml/source/xpath/xpathobject.hxx
index 41a8e45a096e..76cb5459cfbe 100644
--- a/unoxml/source/xpath/xpathobject.hxx
+++ b/unoxml/source/xpath/xpathobject.hxx
@@ -49,7 +49,7 @@ namespace XPath
css::xml::xpath::XPathObjectType const m_XPathObjectType;
public:
- CXPathObject( ::rtl::Reference<DOM::CDocument> const& pDocument,
+ CXPathObject( ::rtl::Reference<DOM::CDocument> pDocument,
::osl::Mutex & rMutex,
std::shared_ptr<xmlXPathObject> const& pXPathObj);