From 8a499b4364dfdf3f921c9ea0cca71dd7bca32cb4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 11 Oct 2021 16:10:08 +0200 Subject: loplugin:moveparam in framework Change-Id: I423fa6a4f4fea5a27ec69f65dac952eff42d3d99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123418 Tested-by: Jenkins Reviewed-by: Noel Grandin --- framework/inc/helper/ocomponentenumeration.hxx | 2 +- framework/inc/jobs/jobdata.hxx | 2 +- framework/source/helper/ocomponentaccess.cxx | 2 +- framework/source/helper/ocomponentenumeration.cxx | 4 ++-- framework/source/jobs/jobdata.cxx | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'framework') diff --git a/framework/inc/helper/ocomponentenumeration.hxx b/framework/inc/helper/ocomponentenumeration.hxx index 008b688dec1a..98f126bbc8d7 100644 --- a/framework/inc/helper/ocomponentenumeration.hxx +++ b/framework/inc/helper/ocomponentenumeration.hxx @@ -62,7 +62,7 @@ class OComponentEnumeration final : public ::cppu::WeakImplHelper< css::containe @onerror Do nothing and reset this object to default with an empty list. *//*-*****************************************************************************************************/ - OComponentEnumeration( const std::vector< css::uno::Reference< css::lang::XComponent > >& seqComponents ); + OComponentEnumeration( std::vector< css::uno::Reference< css::lang::XComponent > >&& seqComponents ); // XEventListener diff --git a/framework/inc/jobs/jobdata.hxx b/framework/inc/jobs/jobdata.hxx index 392b2512453e..48004d279ab8 100644 --- a/framework/inc/jobs/jobdata.hxx +++ b/framework/inc/jobs/jobdata.hxx @@ -186,7 +186,7 @@ class JobData final void setService ( const OUString& sService ); void setEvent ( const OUString& sEvent , const OUString& sAlias ); - void setJobConfig ( const std::vector< css::beans::NamedValue >& lArguments ); + void setJobConfig ( std::vector< css::beans::NamedValue >&& lArguments ); void disableJob ( ); static std::vector< OUString > getEnabledJobsForEvent( const css::uno::Reference< css::uno::XComponentContext >& rxContext, diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx index bfb4113eab4d..ad7409990d25 100644 --- a/framework/source/helper/ocomponentaccess.cxx +++ b/framework/source/helper/ocomponentaccess.cxx @@ -68,7 +68,7 @@ css::uno::Reference< XEnumeration > SAL_CALL OComponentAccess::createEnumeration std::vector< css::uno::Reference< XComponent > > seqComponents; impl_collectAllChildComponents( css::uno::Reference< XFramesSupplier >( xLock, UNO_QUERY ), seqComponents ); - xReturn = new OComponentEnumeration( seqComponents ); + xReturn = new OComponentEnumeration( std::move(seqComponents) ); } // Return result of this operation. diff --git a/framework/source/helper/ocomponentenumeration.cxx b/framework/source/helper/ocomponentenumeration.cxx index 2a06c558c3e4..3d00f75e56c0 100644 --- a/framework/source/helper/ocomponentenumeration.cxx +++ b/framework/source/helper/ocomponentenumeration.cxx @@ -32,9 +32,9 @@ using namespace ::osl; // constructor -OComponentEnumeration::OComponentEnumeration( const std::vector< css::uno::Reference< XComponent > >& seqComponents ) +OComponentEnumeration::OComponentEnumeration( std::vector< css::uno::Reference< XComponent > >&& seqComponents ) : m_nPosition ( 0 ) // 0 is the first position for a valid list and the right value for an invalid list to! - , m_seqComponents ( seqComponents ) + , m_seqComponents ( std::move(seqComponents) ) {} // destructor diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx index 1101d77a94da..a516abdadd7c 100644 --- a/framework/source/jobs/jobdata.cxx +++ b/framework/source/jobs/jobdata.cxx @@ -225,12 +225,12 @@ void JobData::setEvent( const OUString& sEvent , @param lArguments list of arguments, which should be set for this job */ -void JobData::setJobConfig( const std::vector< css::beans::NamedValue >& lArguments ) +void JobData::setJobConfig( std::vector< css::beans::NamedValue >&& lArguments ) { SolarMutexGuard g; // update member - m_lArguments = lArguments; + m_lArguments = std::move(lArguments); // update the configuration ... if possible! if (m_eMode!=E_ALIAS) -- cgit