diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-18 14:51:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-18 18:18:14 +0200 |
commit | 9f25d34d652de14959b5eebed8462225b43e408c (patch) | |
tree | 3db4cad85e372f8953ddd6dc4e4679bd05b0d363 /idlc | |
parent | dfa53b3a69dda7eafc1c3573d5d20cd1b29c77c0 (diff) |
clang-tidy modernize-pass-by-value in idl/idlc
Change-Id: Iccd18eb394564d3ba90c395725923c559b2b81e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134532
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/inc/inheritedinterface.hxx | 5 | ||||
-rw-r--r-- | idlc/inc/options.hxx | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/idlc/inc/inheritedinterface.hxx b/idlc/inc/inheritedinterface.hxx index 10e6ace39342..16462b4da16d 100644 --- a/idlc/inc/inheritedinterface.hxx +++ b/idlc/inc/inheritedinterface.hxx @@ -23,6 +23,7 @@ #include "idlc.hxx" #include <rtl/ustring.hxx> +#include <utility> class AstInterface; class AstType; @@ -31,9 +32,9 @@ class InheritedInterface { public: InheritedInterface( AstType const * theInterface, bool theOptional, - OUString const & theDocumentation): + OUString theDocumentation): interface(theInterface), optional(theOptional), - documentation(theDocumentation) {} + documentation(std::move(theDocumentation)) {} AstType const * getInterface() const { return interface; } diff --git a/idlc/inc/options.hxx b/idlc/inc/options.hxx index b3a791bcb1c5..c3a0949b3d2f 100644 --- a/idlc/inc/options.hxx +++ b/idlc/inc/options.hxx @@ -21,14 +21,14 @@ #define INCLUDED_IDLC_INC_OPTIONS_HXX #include "idlctypes.hxx" +#include <utility> typedef std::unordered_map< OString, OString > OptionMap; class IllegalArgument { public: - IllegalArgument(const OString& msg) - : m_message(msg) {} + IllegalArgument(OString msg) : m_message(std::move(msg)) {} OString m_message; }; |