summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-17 13:52:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-17 17:36:16 +0200
commit4e2f5e85c9c22e57e01d6fa6f585f91287efc7ef (patch)
tree546a095804522d3383ada5695b72d4d1b19b85d8 /sal
parentbf9b032a08070633b0d7c9bd6554fe08b661b901 (diff)
clang-tidy modernize-pass-by-value in sal
Change-Id: If05c5cf0e333d0dbba31475af69c517486bf8923 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/cppunittester/cppunittester.cxx5
-rw-r--r--sal/osl/unx/file_path_helper.cxx5
-rw-r--r--sal/rtl/bootstrap.cxx7
3 files changed, 10 insertions, 7 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index e726ac3f8273..81ddec1568ed 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -69,6 +69,7 @@
#include <algorithm>
#include <string_view>
+#include <utility>
namespace {
@@ -188,8 +189,8 @@ private:
struct test_name_compare
{
- explicit test_name_compare(const std::string& rName):
- maName(rName)
+ explicit test_name_compare(std::string aName):
+ maName(std::move(aName))
{
}
diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx
index 080a99c09928..a8ee5238f95a 100644
--- a/sal/osl/unx/file_path_helper.cxx
+++ b/sal/osl/unx/file_path_helper.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <cassert>
+#include <utility>
#include "file_path_helper.hxx"
#include "uunxapi.hxx"
@@ -170,8 +171,8 @@ public:
returns the first path in list, no need
to call reset first
*/
- path_list_iterator(const OUString& path_list, sal_Unicode list_separator = FPH_CHAR_COLON) :
- m_path_list(path_list),
+ path_list_iterator(OUString path_list, sal_Unicode list_separator = FPH_CHAR_COLON) :
+ m_path_list(std::move(path_list)),
m_end(m_path_list.getStr() + m_path_list.getLength() + 1),
m_separator(list_separator)
{
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 68e219406cc4..12558d319e44 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -39,6 +39,7 @@
#include <o3tl/lru_map.hxx>
#include <o3tl/string_view.hxx>
+#include <utility>
#include <vector>
#include <algorithm>
#include <cstddef>
@@ -121,9 +122,9 @@ struct rtl_bootstrap_NameValue
rtl_bootstrap_NameValue()
{}
- rtl_bootstrap_NameValue(OUString const & name, OUString const & value )
- : sName( name ),
- sValue( value )
+ rtl_bootstrap_NameValue(OUString name, OUString value )
+ : sName(std::move( name )),
+ sValue(std::move( value ))
{}
};