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>
This commit is contained in:
@@ -24,14 +24,15 @@
|
|||||||
#include <tools/solar.h>
|
#include <tools/solar.h>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
class SvStringHashEntry
|
class SvStringHashEntry
|
||||||
{
|
{
|
||||||
OString aName;
|
OString aName;
|
||||||
sal_uLong nValue;
|
sal_uLong nValue;
|
||||||
public:
|
public:
|
||||||
SvStringHashEntry( const OString& rName )
|
SvStringHashEntry( OString aName_ )
|
||||||
: aName(rName)
|
: aName(std::move(aName_))
|
||||||
, nValue(0)
|
, nValue(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include "idlc.hxx"
|
#include "idlc.hxx"
|
||||||
|
|
||||||
#include <rtl/ustring.hxx>
|
#include <rtl/ustring.hxx>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
class AstInterface;
|
class AstInterface;
|
||||||
class AstType;
|
class AstType;
|
||||||
@@ -31,9 +32,9 @@ class InheritedInterface {
|
|||||||
public:
|
public:
|
||||||
InheritedInterface(
|
InheritedInterface(
|
||||||
AstType const * theInterface, bool theOptional,
|
AstType const * theInterface, bool theOptional,
|
||||||
OUString const & theDocumentation):
|
OUString theDocumentation):
|
||||||
interface(theInterface), optional(theOptional),
|
interface(theInterface), optional(theOptional),
|
||||||
documentation(theDocumentation) {}
|
documentation(std::move(theDocumentation)) {}
|
||||||
|
|
||||||
AstType const * getInterface() const { return interface; }
|
AstType const * getInterface() const { return interface; }
|
||||||
|
|
||||||
|
@@ -21,14 +21,14 @@
|
|||||||
#define INCLUDED_IDLC_INC_OPTIONS_HXX
|
#define INCLUDED_IDLC_INC_OPTIONS_HXX
|
||||||
|
|
||||||
#include "idlctypes.hxx"
|
#include "idlctypes.hxx"
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
typedef std::unordered_map< OString, OString > OptionMap;
|
typedef std::unordered_map< OString, OString > OptionMap;
|
||||||
|
|
||||||
class IllegalArgument
|
class IllegalArgument
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IllegalArgument(const OString& msg)
|
IllegalArgument(OString msg) : m_message(std::move(msg)) {}
|
||||||
: m_message(msg) {}
|
|
||||||
|
|
||||||
OString m_message;
|
OString m_message;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user