diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-31 10:23:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-31 15:11:27 +0200 |
commit | 5ecdedbf81af5516ff7d2195383dc9d6389fb0d0 (patch) | |
tree | 5b07d41d683abb65354bf4ced261edfb86ef3174 /basic/source/classes | |
parent | af44198d80edce92bdbb82dfd6f218eeb6163484 (diff) |
clang-tidy modernize-pass-by-value in basic
Change-Id: I9034ab95a4ccb58e36e77d911dd33cc50857c03a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135176
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/classes')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 19 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 5 |
2 files changed, 13 insertions, 11 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 8968f19161c5..ad4aefb52f72 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include <o3tl/any.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/errcode.hxx> #include <svl/hint.hxx> @@ -2563,13 +2564,13 @@ SbUnoProperty::SbUnoProperty const OUString& aName_, SbxDataType eSbxType, SbxDataType eRealSbxType, - const Property& aUnoProp_, + Property aUnoProp_, sal_Int32 nId_, bool bInvocation, bool bUnoStruct ) : SbxProperty( aName_, eSbxType ) - , aUnoProp( aUnoProp_ ) + , aUnoProp(std::move( aUnoProp_ )) , nId( nId_ ) , mbInvocation( bInvocation ) , mRealType( eRealSbxType ) @@ -3781,7 +3782,7 @@ public: SbxObjectRef xSbxObj; OUString aPrefixName; - explicit BasicAllListener_Impl( const OUString& aPrefixName ); + explicit BasicAllListener_Impl( OUString aPrefixName ); // Methods of XAllListener virtual void SAL_CALL firing(const AllEventObject& Event) override; @@ -3793,8 +3794,8 @@ public: } -BasicAllListener_Impl::BasicAllListener_Impl(const OUString& aPrefixName_) - : aPrefixName( aPrefixName_ ) +BasicAllListener_Impl::BasicAllListener_Impl(OUString aPrefixName_) + : aPrefixName(std::move( aPrefixName_ )) { } @@ -3879,7 +3880,7 @@ class InvocationToAllListenerMapper : public WeakImplHelper< XInvocation > { public: InvocationToAllListenerMapper( const Reference< XIdlClass >& ListenerType, - const Reference< XAllListener >& AllListener, const Any& Helper ); + const Reference< XAllListener >& AllListener, Any Helper ); // XInvocation virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection() override; @@ -3920,10 +3921,10 @@ static Reference< XInterface > createAllListenerAdapter // InvocationToAllListenerMapper InvocationToAllListenerMapper::InvocationToAllListenerMapper - ( const Reference< XIdlClass >& ListenerType, const Reference< XAllListener >& AllListener, const Any& Helper ) + ( const Reference< XIdlClass >& ListenerType, const Reference< XAllListener >& AllListener, Any Helper ) : m_xAllListener( AllListener ) , m_xListenerType( ListenerType ) - , m_Helper( Helper ) + , m_Helper(std::move( Helper )) { } @@ -4629,7 +4630,7 @@ TypeClass StructRefInfo::getTypeClass() const return maType.getTypeClass(); } -SbUnoStructRefObject::SbUnoStructRefObject( const OUString& aName_, const StructRefInfo& rMemberInfo ) : SbxObject( aName_ ), maMemberInfo( rMemberInfo ), mbMemberCacheInit( false ) +SbUnoStructRefObject::SbUnoStructRefObject( const OUString& aName_, StructRefInfo aMemberInfo ) : SbxObject( aName_ ), maMemberInfo(std::move( aMemberInfo )), mbMemberCacheInit( false ) { SetClassName( maMemberInfo.getTypeName() ); } diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 1e5e7ec36a7f..af2b4b2c9c5d 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -18,6 +18,7 @@ */ +#include <utility> #include <vcl/svapp.hxx> #include <tools/stream.hxx> #include <tools/diagnose_ex.h> @@ -2212,8 +2213,8 @@ class FormObjEventListenerImpl: public: FormObjEventListenerImpl(const FormObjEventListenerImpl&) = delete; const FormObjEventListenerImpl& operator=(const FormObjEventListenerImpl&) = delete; - FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent, const uno::Reference< frame::XModel >& xModel ) : - mpUserForm( pUserForm ), mxComponent( xComponent), mxModel( xModel ), + FormObjEventListenerImpl( SbUserFormModule* pUserForm, uno::Reference< lang::XComponent > xComponent, uno::Reference< frame::XModel > xModel ) : + mpUserForm( pUserForm ), mxComponent(std::move( xComponent)), mxModel(std::move( xModel )), mbDisposed( false ), mbOpened( false ), mbActivated( false ), mbShowing( false ) { if ( mxComponent.is() ) |