summaryrefslogtreecommitdiff
path: root/include/codemaker
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-18 11:52:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-18 14:08:28 +0200
commit225328b1e3994fcd6b293f007fee10c27e98291e (patch)
treeddead398248e0cab5fe003c19371bd074e2db267 /include/codemaker
parent2c6cea672a852b85cfb6d2e313d806f257481417 (diff)
clang-tidy modernize-pass-by-value in codemaker
Change-Id: I2bd9c4c8ced5f0edb9dbf560fe0ed126b9233c26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134519 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/codemaker')
-rw-r--r--include/codemaker/exceptiontree.hxx5
-rw-r--r--include/codemaker/global.hxx3
-rw-r--r--include/codemaker/options.hxx5
3 files changed, 8 insertions, 5 deletions
diff --git a/include/codemaker/exceptiontree.hxx b/include/codemaker/exceptiontree.hxx
index e42850c101e5..4d5055f8e589 100644
--- a/include/codemaker/exceptiontree.hxx
+++ b/include/codemaker/exceptiontree.hxx
@@ -24,6 +24,7 @@
#include <rtl/string.hxx>
#include <memory>
+#include <utility>
#include <vector>
class TypeManager;
@@ -37,8 +38,8 @@ struct ExceptionTreeNode {
typedef std::vector< std::unique_ptr<ExceptionTreeNode> > Children;
// Internally used by ExceptionTree:
- ExceptionTreeNode(rtl::OString const & theName):
- name(theName), present(false) {}
+ ExceptionTreeNode(rtl::OString theName):
+ name(std::move(theName)), present(false) {}
// Internally used by ExceptionTree:
~ExceptionTreeNode() { clearChildren(); }
diff --git a/include/codemaker/global.hxx b/include/codemaker/global.hxx
index 3fff70f9988f..e62e1a973273 100644
--- a/include/codemaker/global.hxx
+++ b/include/codemaker/global.hxx
@@ -20,6 +20,7 @@
#ifndef INCLUDED_CODEMAKER_GLOBAL_HXX
#define INCLUDED_CODEMAKER_GLOBAL_HXX
+#include <utility>
#include <vector>
#include <string_view>
@@ -80,7 +81,7 @@ bool removeTypeFile(const ::rtl::OString& fileName);
class CannotDumpException final {
public:
- CannotDumpException(OUString const & message): message_(message) {}
+ CannotDumpException(OUString message): message_(std::move(message)) {}
~CannotDumpException() noexcept;
diff --git a/include/codemaker/options.hxx b/include/codemaker/options.hxx
index ca86fa1b3995..803274901a4a 100644
--- a/include/codemaker/options.hxx
+++ b/include/codemaker/options.hxx
@@ -22,6 +22,7 @@
#include <codemaker/global.hxx>
#include <unordered_map>
+#include <utility>
typedef std::unordered_map
<
@@ -33,8 +34,8 @@ typedef std::unordered_map
class IllegalArgument
{
public:
- IllegalArgument(const ::rtl::OString& msg)
- : m_message(msg) {}
+ IllegalArgument(::rtl::OString msg)
+ : m_message(std::move(msg)) {}
::rtl::OString m_message;
};