clang-tidy modernize-pass-by-value in cppu
Change-Id: I7f6432b9609d175ff7e21ff2e73991275eea60b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -47,7 +47,7 @@ class Proxy : public uno_Interface
|
||||
void * m_pProbeContext;
|
||||
|
||||
public:
|
||||
explicit Proxy(css::uno::Mapping const & to_from,
|
||||
explicit Proxy(css::uno::Mapping to_from,
|
||||
uno_Environment * pTo,
|
||||
uno_Environment * pFrom,
|
||||
uno_Interface * pUnoI,
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include <sal/log.hxx>
|
||||
#include <uno/dispatcher.h>
|
||||
#include <typelib/typedescription.hxx>
|
||||
#include <utility>
|
||||
|
||||
using namespace com::sun::star;
|
||||
|
||||
@@ -188,7 +189,7 @@ static void s_acquireAndRegister_v(va_list * pParam)
|
||||
}
|
||||
}
|
||||
|
||||
Proxy::Proxy(uno::Mapping const & to_from,
|
||||
Proxy::Proxy(uno::Mapping to_from,
|
||||
uno_Environment * pTo,
|
||||
uno_Environment * pFrom,
|
||||
uno_Interface * pUnoI,
|
||||
@@ -201,7 +202,7 @@ Proxy::Proxy(uno::Mapping const & to_from,
|
||||
m_from (pFrom),
|
||||
m_to (pTo),
|
||||
m_from_to (pFrom, pTo),
|
||||
m_to_from (to_from),
|
||||
m_to_from (std::move(to_from)),
|
||||
m_pUnoI (pUnoI),
|
||||
m_pTypeDescr (pTypeDescr),
|
||||
m_aOId (rOId),
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <osl/diagnose.h>
|
||||
#include <uno/threadpool.h>
|
||||
#include <sal/log.hxx>
|
||||
#include <utility>
|
||||
|
||||
#include "thread.hxx"
|
||||
#include "jobqueue.hxx"
|
||||
@@ -90,13 +91,13 @@ namespace cppu_threadpool {
|
||||
}
|
||||
|
||||
|
||||
ORequestThread::ORequestThread( ThreadPoolHolder const &aThreadPool,
|
||||
ORequestThread::ORequestThread( ThreadPoolHolder aThreadPool,
|
||||
JobQueue *pQueue,
|
||||
const ByteSequence &aThreadId,
|
||||
ByteSequence aThreadId,
|
||||
bool bAsynchron )
|
||||
: m_aThreadPool( aThreadPool )
|
||||
: m_aThreadPool(std::move( aThreadPool ))
|
||||
, m_pQueue( pQueue )
|
||||
, m_aThreadId( aThreadId )
|
||||
, m_aThreadId(std::move( aThreadId ))
|
||||
, m_bAsynchron( bAsynchron )
|
||||
{}
|
||||
|
||||
|
@@ -35,9 +35,9 @@ namespace cppu_threadpool {
|
||||
public salhelper::SimpleReferenceObject, public osl::Thread
|
||||
{
|
||||
public:
|
||||
ORequestThread( ThreadPoolHolder const &aThreadPool,
|
||||
ORequestThread( ThreadPoolHolder aThreadPool,
|
||||
JobQueue * ,
|
||||
const ::rtl::ByteSequence &aThreadId,
|
||||
::rtl::ByteSequence aThreadId,
|
||||
bool bAsynchron );
|
||||
virtual ~ORequestThread() override;
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <osl/diagnose.h>
|
||||
@@ -39,7 +40,7 @@ using namespace ::rtl;
|
||||
namespace cppu_threadpool
|
||||
{
|
||||
WaitingThread::WaitingThread(
|
||||
rtl::Reference<ORequestThread> const & theThread): thread(theThread)
|
||||
rtl::Reference<ORequestThread> theThread): thread(std::move(theThread))
|
||||
{}
|
||||
|
||||
DisposedCallerAdminHolder const & DisposedCallerAdmin::getInstance()
|
||||
|
@@ -69,7 +69,7 @@ namespace cppu_threadpool {
|
||||
rtl::Reference< ORequestThread > thread;
|
||||
|
||||
explicit WaitingThread(
|
||||
rtl::Reference<ORequestThread> const & theThread);
|
||||
rtl::Reference<ORequestThread> theThread);
|
||||
};
|
||||
|
||||
typedef std::deque< struct ::cppu_threadpool::WaitingThread * > WaitingThreadDeque;
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <typelib/typedescription.h>
|
||||
#include <uno/mapping.h>
|
||||
#include <uno/environment.hxx>
|
||||
#include <utility>
|
||||
|
||||
#include <osl/interlck.h>
|
||||
|
||||
@@ -35,7 +36,7 @@ struct IdentityMapping : public uno_Mapping
|
||||
sal_Int32 m_nRef;
|
||||
uno::Environment m_env;
|
||||
|
||||
explicit IdentityMapping(uno::Environment const & rEnv);
|
||||
explicit IdentityMapping(uno::Environment aEnv);
|
||||
};
|
||||
|
||||
}
|
||||
@@ -86,9 +87,9 @@ static void s_mapInterface(uno_Mapping * pMapping,
|
||||
}
|
||||
|
||||
|
||||
IdentityMapping::IdentityMapping(uno::Environment const & rEnv)
|
||||
IdentityMapping::IdentityMapping(uno::Environment aEnv)
|
||||
: m_nRef(0),
|
||||
m_env(rEnv)
|
||||
m_env(std::move(aEnv))
|
||||
{
|
||||
uno_Mapping::acquire = s_acquire;
|
||||
uno_Mapping::release = s_release;
|
||||
|
@@ -42,6 +42,7 @@
|
||||
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -78,7 +79,7 @@ struct ObjectEntry
|
||||
sal_Int32 nRef;
|
||||
bool mixedObject;
|
||||
|
||||
explicit ObjectEntry( const OUString & rOId_ );
|
||||
explicit ObjectEntry( OUString aOId_ );
|
||||
|
||||
void append(
|
||||
uno_DefaultEnvironment * pEnv,
|
||||
@@ -147,8 +148,8 @@ struct uno_DefaultEnvironment : public uno_ExtEnvironment
|
||||
};
|
||||
|
||||
|
||||
ObjectEntry::ObjectEntry( OUString const & rOId_ )
|
||||
: oid( rOId_ ),
|
||||
ObjectEntry::ObjectEntry( OUString aOId_ )
|
||||
: oid(std::move( aOId_ )),
|
||||
nRef( 0 ),
|
||||
mixedObject( false )
|
||||
{
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include <mutex>
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
@@ -125,11 +126,11 @@ struct MappingEntry
|
||||
|
||||
MappingEntry(
|
||||
uno_Mapping * pMapping_, uno_freeMappingFunc freeMapping_,
|
||||
const OUString & rMappingName_ )
|
||||
OUString aMappingName_ )
|
||||
: nRef( 1 )
|
||||
, pMapping( pMapping_ )
|
||||
, freeMapping( freeMapping_ )
|
||||
, aMappingName( rMappingName_ )
|
||||
, aMappingName(std::move( aMappingName_ ))
|
||||
{}
|
||||
};
|
||||
|
||||
@@ -192,9 +193,9 @@ struct uno_Mediate_Mapping : public uno_Mapping
|
||||
OUString aAddPurpose;
|
||||
|
||||
uno_Mediate_Mapping(
|
||||
const Environment & rFrom_, const Environment & rTo_,
|
||||
const Mapping & rFrom2Uno_, const Mapping & rUno2To_,
|
||||
const OUString & rAddPurpose );
|
||||
Environment aFrom_, Environment aTo_,
|
||||
Mapping aFrom2Uno_, Mapping aUno2To_,
|
||||
OUString aAddPurpose );
|
||||
};
|
||||
|
||||
}
|
||||
@@ -265,15 +266,15 @@ static void mediate_mapInterface(
|
||||
}
|
||||
|
||||
uno_Mediate_Mapping::uno_Mediate_Mapping(
|
||||
const Environment & rFrom_, const Environment & rTo_,
|
||||
const Mapping & rFrom2Uno_, const Mapping & rUno2To_,
|
||||
const OUString & rAddPurpose_ )
|
||||
Environment aFrom_, Environment aTo_,
|
||||
Mapping aFrom2Uno_, Mapping aUno2To_,
|
||||
OUString aAddPurpose_ )
|
||||
: nRef( 1 )
|
||||
, aFrom( rFrom_ )
|
||||
, aTo( rTo_ )
|
||||
, aFrom2Uno( rFrom2Uno_ )
|
||||
, aUno2To( rUno2To_ )
|
||||
, aAddPurpose( rAddPurpose_ )
|
||||
, aFrom(std::move( aFrom_ ))
|
||||
, aTo(std::move( aTo_ ))
|
||||
, aFrom2Uno(std::move( aFrom2Uno_ ))
|
||||
, aUno2To(std::move( aUno2To_ ))
|
||||
, aAddPurpose(std::move( aAddPurpose_ ))
|
||||
{
|
||||
uno_Mapping::acquire = mediate_acquire;
|
||||
uno_Mapping::release = mediate_release;
|
||||
|
Reference in New Issue
Block a user