summaryrefslogtreecommitdiff
path: root/unoxml/source/xpath
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/source/xpath
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/source/xpath')
-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
4 files changed, 10 insertions, 6 deletions
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);