summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-09 08:36:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-10 13:13:15 +0200
commitf71606c920a3f78294da745cd9ef1eacde010224 (patch)
treeb808351112a9b13fb775f7794d18b0cb8b6e1645 /basic
parentb28de9d32016a904e4ba457a9a6c62098416c729 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sbunoobj.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 06b67ba8bd86..51b1b956b170 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -2053,7 +2053,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if ( pProp->isUnoStruct() )
{
- SbUnoStructRefObject* pSbUnoObject = new SbUnoStructRefObject( pProp->GetName(), aMember );
+ SbUnoStructRefObject* pSbUnoObject = new SbUnoStructRefObject( pProp->GetName(), std::move(aMember) );
SbxObjectRef xWrapper = static_cast<SbxObject*>(pSbUnoObject);
pVar->PutObject( xWrapper.get() );
}
@@ -4679,7 +4679,7 @@ SbxVariable* SbUnoStructRefObject::Find( const OUString& rName, SbxClassType t )
Property aProp;
aProp.Name = rName;
aProp.Type = css::uno::Type( it->second->getTypeClass(), it->second->getTypeName() );
- SbUnoProperty* pProp = new SbUnoProperty( rName, eSbxType, eRealSbxType, aProp, 0, false, ( aProp.Type.getTypeClass() == css::uno::TypeClass_STRUCT) );
+ SbUnoProperty* pProp = new SbUnoProperty( rName, eSbxType, eRealSbxType, std::move(aProp), 0, false, ( aProp.Type.getTypeClass() == css::uno::TypeClass_STRUCT) );
SbxVariableRef xVarRef = pProp;
QuickInsert( xVarRef.get() );
pRes = xVarRef.get();
@@ -4739,7 +4739,7 @@ void SbUnoStructRefObject::implCreateAll()
Property aProp;
aProp.Name = rName;
aProp.Type = css::uno::Type( field.second->getTypeClass(), field.second->getTypeName() );
- SbUnoProperty* pProp = new SbUnoProperty( rName, eSbxType, eRealSbxType, aProp, 0, false, ( aProp.Type.getTypeClass() == css::uno::TypeClass_STRUCT) );
+ SbUnoProperty* pProp = new SbUnoProperty( rName, eSbxType, eRealSbxType, std::move(aProp), 0, false, ( aProp.Type.getTypeClass() == css::uno::TypeClass_STRUCT) );
SbxVariableRef xVarRef = pProp;
QuickInsert( xVarRef.get() );
}