canvas/inc/propertysethelper.hxx | 9 +++------ connectivity/source/drivers/writer/WDatabaseMetaData.cxx | 2 +- dbaccess/source/ui/dlg/sqlmessage.cxx | 2 +- oox/source/drawingml/customshapegeometry.cxx | 3 +-- sfx2/source/control/templatelocalview.cxx | 2 +- slideshow/source/engine/animatedsprite.cxx | 2 +- sw/source/core/doc/docnum.cxx | 6 +++--- vcl/source/filter/FilterConfigCache.cxx | 2 +- 8 files changed, 12 insertions(+), 16 deletions(-)
New commits: commit 7ba7a4923e4ba000cdda218fea57476414ab16cc Author: Caolán McNamara <[email protected]> AuthorDate: Sat Aug 2 15:31:55 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Aug 2 20:18:24 2025 +0200 cid#1660456 Variable copied when it could be moved and cid#1660454 Variable copied when it could be moved cid#1660453 Variable copied when it could be moved cid#1660439 Variable copied when it could be moved cid#1660437 Variable copied when it could be moved cid#1660433 Variable copied when it could be moved cid#1660429 Variable copied when it could be moved cid#1660427 Variable copied when it could be moved Change-Id: Id04f5b40e59d92a06c83a30848eff0f1cda1d5e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188826 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/canvas/inc/propertysethelper.hxx b/canvas/inc/propertysethelper.hxx index aebcbe049e20..754a35009a9d 100644 --- a/canvas/inc/propertysethelper.hxx +++ b/canvas/inc/propertysethelper.hxx @@ -68,21 +68,18 @@ namespace canvas const GetterType& getter, const SetterType& setter) { - MapType::MapEntry aEntry={name, {getter, setter}}; - push_back(aEntry); + push_back(MapType::MapEntry{name, {getter, setter}}); } MakeMap(const char* name, const GetterType& getter) { - MapType::MapEntry aEntry={name, {getter, SetterType()}}; - push_back(aEntry); + push_back(MapType::MapEntry{name, {getter, SetterType()}}); } MakeMap& operator()(const char* name, const GetterType& getter, const SetterType& setter) { - MapType::MapEntry aEntry={name, {getter, setter}}; - push_back(aEntry); + push_back(MapType::MapEntry{name, {getter, setter}}); return *this; } }; diff --git a/connectivity/source/drivers/writer/WDatabaseMetaData.cxx b/connectivity/source/drivers/writer/WDatabaseMetaData.cxx index 29a6ab9379e2..0f336bfa225b 100644 --- a/connectivity/source/drivers/writer/WDatabaseMetaData.cxx +++ b/connectivity/source/drivers/writer/WDatabaseMetaData.cxx @@ -99,7 +99,7 @@ uno::Reference<sdbc::XResultSet> SAL_CALL OWriterDatabaseMetaData::getTables( new ORowSetValueDecorator(rName), new ORowSetValueDecorator(aTable), ODatabaseMetaDataResultSet::getEmptyValue() }; - aRows.push_back(aRow); + aRows.push_back(std::move(aRow)); } } diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 8a4cf367748e..3d15c662ea17 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -228,7 +228,7 @@ namespace aDisplayInfo.pImageProvider = _rFactory.getImageProvider( aCurrentElement.getType() ); aDisplayInfo.pLabelProvider = _rFactory.getLabelProvider( aCurrentElement.getType(), false ); - _out_rChain.push_back( aDisplayInfo ); + _out_rChain.push_back(std::move(aDisplayInfo)); if ( aCurrentElement.getType() == SQLExceptionInfo::TYPE::SQLContext ) { diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index a784906b017f..3b754e0b5dd6 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -1212,8 +1212,7 @@ ContextHandlerRef Path2DListContext::onCreateContext( sal_Int32 aElementToken, c { if ( aElementToken == A_TOKEN( path ) ) { - Path2D aPath2D; - mrPath2DList.push_back( aPath2D ); + mrPath2DList.push_back(Path2D()); return new Path2DContext( *this, rAttribs, mrCustomShapeProperties, mrSegments, mrPath2DList.back() ); } return nullptr; diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index 6a74cd41ec26..237d1adfa538 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -128,7 +128,7 @@ void TemplateLocalView::Populate() mnThumbnailHeight); pItem->maTemplates.push_back(aProperties); - maAllTemplates.push_back(aProperties); + maAllTemplates.push_back(std::move(aProperties)); } maRegions.push_back(std::move(pItem)); diff --git a/slideshow/source/engine/animatedsprite.cxx b/slideshow/source/engine/animatedsprite.cxx index 1720a1e6e54c..b28b5095a4ca 100644 --- a/slideshow/source/engine/animatedsprite.cxx +++ b/slideshow/source/engine/animatedsprite.cxx @@ -67,7 +67,7 @@ namespace slideshow::internal { ENSURE_OR_THROW( mpViewLayer->getCanvas(), "AnimatedSprite::getContentCanvas(): No view layer canvas" ); - const ::cppcanvas::CanvasSharedPtr pContentCanvas( mpSprite->getContentCanvas() ); + ::cppcanvas::CanvasSharedPtr pContentCanvas( mpSprite->getContentCanvas() ); pContentCanvas->clear(); // extract linear part of canvas view transformation diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index edecdcf5b256..4d4bb81c1f15 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -62,7 +62,7 @@ namespace { void lcl_ResetIndentAttrs(SwDoc *pDoc, const SwPaM &rPam, - const o3tl::sorted_vector<sal_uInt16> aResetAttrsArray, + const o3tl::sorted_vector<sal_uInt16>& rResetAttrsArray, SwRootFrame const*const pLayout) { // #i114929# @@ -73,11 +73,11 @@ namespace { { SwPaM aPam( rPam.Start()->GetNode(), 0, rPam.End()->GetNode(), rPam.End()->GetNode().GetTextNode()->Len() ); - pDoc->ResetAttrs( aPam, false, aResetAttrsArray, true, pLayout ); + pDoc->ResetAttrs( aPam, false, rResetAttrsArray, true, pLayout ); } else { - pDoc->ResetAttrs( rPam, false, aResetAttrsArray, true, pLayout ); + pDoc->ResetAttrs( rPam, false, rResetAttrsArray, true, pLayout ); } } diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx index 6bbf80415673..25411c78c392 100644 --- a/vcl/source/filter/FilterConfigCache.cxx +++ b/vcl/source/filter/FilterConfigCache.cxx @@ -256,7 +256,7 @@ void FilterConfigCache::ImplInitSmart() if ( aEntry.nFlags & 1 ) aImport.push_back( aEntry ); if ( aEntry.nFlags & 2 ) - aExport.push_back( aEntry ); + aExport.push_back(std::move(aEntry)); } }
