summaryrefslogtreecommitdiff
path: root/unoidl/source/unoidlprovider.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-18 12:05:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-18 14:45:27 +0200
commit75918e709a6d0e2b94b5e4fd9c2eb248ef912e00 (patch)
treef5231910ba430165e4ce04dfb54bd4cf32c435a4 /unoidl/source/unoidlprovider.cxx
parentf8560e09006cec5cc6ef26ccbf4f21aa28c22ac3 (diff)
clang-tidy modernize-pass-by-value in unoidl
Change-Id: Ibeb6aa656d6ed8b8ba78e800c9e28ba63ec0ec40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134521 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoidl/source/unoidlprovider.cxx')
-rw-r--r--unoidl/source/unoidlprovider.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/unoidl/source/unoidlprovider.cxx b/unoidl/source/unoidlprovider.cxx
index 216bf564e14d..d6f4d4ddd51a 100644
--- a/unoidl/source/unoidlprovider.cxx
+++ b/unoidl/source/unoidlprovider.cxx
@@ -14,6 +14,7 @@
#include <cstring>
#include <set>
#include <string_view>
+#include <utility>
#include <vector>
#include <o3tl/string_view.hxx>
@@ -35,7 +36,7 @@ namespace unoidl::detail {
class MappedFile: public salhelper::SimpleReferenceObject {
public:
- explicit MappedFile(OUString const & fileUrl);
+ explicit MappedFile(OUString fileUrl);
sal_uInt8 read8(sal_uInt32 offset) const;
@@ -258,7 +259,7 @@ void checkEntityName(
}
-MappedFile::MappedFile(OUString const & fileUrl): uri(fileUrl), handle(nullptr) {
+MappedFile::MappedFile(OUString fileUrl): uri(std::move(fileUrl)), handle(nullptr) {
oslFileError e = osl_openFile(uri.pData, &handle, osl_File_OpenFlag_Read);
switch (e) {
case osl_File_E_None:
@@ -657,11 +658,11 @@ class UnoidlModuleEntity;
class UnoidlCursor: public MapCursor {
public:
UnoidlCursor(
- rtl::Reference< MappedFile > const & file,
- rtl::Reference<UnoidlProvider> const & reference1,
- rtl::Reference<UnoidlModuleEntity> const & reference2,
+ rtl::Reference< MappedFile > file,
+ rtl::Reference<UnoidlProvider> reference1,
+ rtl::Reference<UnoidlModuleEntity> reference2,
NestedMap const & map):
- file_(file), reference1_(reference1), reference2_(reference2),
+ file_(std::move(file)), reference1_(std::move(reference1)), reference2_(std::move(reference2)),
map_(map), index_(0)
{}