summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-21 10:18:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-21 12:59:41 +0200
commit49fdae5bb4f584d26cea958e554678154bedf379 (patch)
treeb888e7853807edbe531c3055582575e06396c8a1 /jvmfwk
parent8fb6f3d894093c729e8ee304f8b6fb553a7ceac4 (diff)
clang-tidy modernize-pass-by-value in io..jvmfwk
Change-Id: I6e19d4d03957c35caa79a231927eae04ae630442 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx4
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.hxx5
-rw-r--r--jvmfwk/source/framework.hxx5
3 files changed, 8 insertions, 6 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 72c3a2424f63..45feea3b1db1 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -695,8 +695,8 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
JavaVMInitArgs vm_args;
struct Option {
- Option(OString const & theOptionString, void * theExtraInfo):
- optionString(theOptionString), extraInfo(theExtraInfo)
+ Option(OString theOptionString, void * theExtraInfo):
+ optionString(std::move(theOptionString)), extraInfo(theExtraInfo)
{}
OString optionString;
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
index 9ba0055832ed..0f4b1dac0f42 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_UTIL_HXX
#include <rtl/ustring.hxx>
+#include <utility>
#include <vector>
#include <vendorbase.hxx>
@@ -63,7 +64,7 @@ bool makeDriveLetterSame(OUString * fileURL);
struct InfoFindSame
{
OUString sJava;
- explicit InfoFindSame(const OUString& sJavaHome):sJava(sJavaHome){}
+ explicit InfoFindSame(OUString sJavaHome):sJava(std::move(sJavaHome)){}
bool operator () (const rtl::Reference<VendorBase> & aVendorInfo)
{
@@ -74,7 +75,7 @@ struct InfoFindSame
struct SameOrSubDirJREMap
{
OUString s1;
- explicit SameOrSubDirJREMap(const OUString& s):s1(s){
+ explicit SameOrSubDirJREMap(OUString s):s1(std::move(s)){
}
bool operator () (const std::pair<const OUString, rtl::Reference<VendorBase> > & s2)
diff --git a/jvmfwk/source/framework.hxx b/jvmfwk/source/framework.hxx
index 39bda148b24a..2ab126614868 100644
--- a/jvmfwk/source/framework.hxx
+++ b/jvmfwk/source/framework.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_JVMFWK_SOURCE_FRAMEWORK_HXX
#include <jvmfwk/framework.hxx>
+#include <utility>
namespace jfw
{
@@ -28,8 +29,8 @@ class FrameworkException : public std::exception
{
public:
- FrameworkException(javaFrameworkError err, const OString& msg):
- errorCode(err), message(msg)
+ FrameworkException(javaFrameworkError err, OString msg):
+ errorCode(err), message(std::move(msg))
{
}
javaFrameworkError errorCode;