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 ++-- package/source/manifest/ManifestImport.cxx | 2 +- package/source/manifest/ManifestImport.hxx | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-)
New commits: commit 8a499b4364dfdf3f921c9ea0cca71dd7bca32cb4 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Oct 11 16:10:08 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Oct 11 18:36:53 2021 +0200 loplugin:moveparam in framework Change-Id: I423fa6a4f4fea5a27ec69f65dac952eff42d3d99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123418 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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) commit 0eb51b92e0c528b2b5c1f0d8011b70c808c81605 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Oct 11 16:10:55 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Oct 11 18:36:42 2021 +0200 loplugin:moveparam in package Change-Id: I681a6b0b30aeff9a51e36050629d8a617797a21f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123419 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx index 3cab72abacfe..0a1c4ad5bb1d 100644 --- a/package/source/manifest/ManifestImport.cxx +++ b/package/source/manifest/ManifestImport.cxx @@ -560,7 +560,7 @@ OUString ManifestImport::PushNameAndNamespaces( const OUString& aName, const uno if ( !aConvertedName.getLength() ) aConvertedName = ConvertName( aName ); - aStack.emplace_back( aConvertedName, aNamespaces ); + aStack.emplace_back( aConvertedName, std::move(aNamespaces) ); for (const std::pair<OUString,OUString> & rAttribsStr : aAttribsStrs) { // convert the attribute names on filling diff --git a/package/source/manifest/ManifestImport.hxx b/package/source/manifest/ManifestImport.hxx index 08ee251f6e81..1a2b4de11a6d 100644 --- a/package/source/manifest/ManifestImport.hxx +++ b/package/source/manifest/ManifestImport.hxx @@ -41,9 +41,9 @@ struct ManifestScopeEntry StringHashMap m_aNamespaces; bool m_bValid; - ManifestScopeEntry( const OUString& aConvertedName, const StringHashMap& aNamespaces ) + ManifestScopeEntry( const OUString& aConvertedName, StringHashMap&& aNamespaces ) : m_aConvertedName( aConvertedName ) - , m_aNamespaces( aNamespaces ) + , m_aNamespaces( std::move(aNamespaces) ) , m_bValid( true ) {} };