From f71606c920a3f78294da745cd9ef1eacde010224 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 9 Jun 2022 08:36:33 +0200 Subject: new loplugin:moveit look for local variables that can be std::move'd to parameters off by default, since it doesn't do proper data flow analysis Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527 Tested-by: Jenkins Reviewed-by: Noel Grandin --- scripting/source/stringresource/stringresource.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripting') diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index e3208321d987..d9a2e377e5ec 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -1421,7 +1421,7 @@ void StringResourcePersistenceImpl::importBinary( const Sequence< ::sal_Int8 >& Reference< io::XInputStream > xInput = aIn.getInputStreamForSection( nSize ); if( xInput.is() ) { - LocaleItem* pLocaleItem = new LocaleItem( aLocale ); + LocaleItem* pLocaleItem = new LocaleItem( std::move(aLocale) ); if( iDefault == i ) pUseAsDefaultItem = pLocaleItem; m_aLocaleItemVector.emplace_back( pLocaleItem ); @@ -1510,7 +1510,7 @@ void StringResourcePersistenceImpl::implScanLocaleNames( const Sequence< OUStrin if( checkNamingSceme( aPureName, m_aNameBase, aLocale ) ) { - LocaleItem* pLocaleItem = new LocaleItem( aLocale, false ); + LocaleItem* pLocaleItem = new LocaleItem( std::move(aLocale), false ); m_aLocaleItemVector.emplace_back( pLocaleItem ); if( m_pCurrentLocaleItem == nullptr ) -- cgit