connectivity/source/drivers/firebird/DatabaseMetaData.cxx | 2 +- cui/source/dialogs/AdditionsDialog.cxx | 6 +++--- dbaccess/source/ui/tabledesign/TableController.cxx | 2 +- helpcompiler/source/HelpLinker.cxx | 2 +- opencl/source/openclwrapper.cxx | 2 +- sfx2/source/dialog/filtergrouping.cxx | 2 +- slideshow/source/engine/slide/userpaintoverlay.cxx | 2 +- vcl/source/outdev/transparent.cxx | 2 +- xmlsecurity/source/helper/xsecsign.cxx | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-)
New commits: commit 79c3a093854ac49f4c5e1b7d0797cd7dca5dad66 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat Aug 2 19:40:33 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sun Aug 3 12:18:39 2025 +0200 cid#1660333 Variable copied when it could be moved and cid#1660326 Variable copied when it could be moved cid#1660325 Variable copied when it could be moved cid#1660324 Variable copied when it could be moved cid#1660321 Variable copied when it could be moved cid#1660320 Variable copied when it could be moved cid#1660316 Variable copied when it could be moved cid#1660313 Variable copied when it could be moved cid#1660307 Variable copied when it could be moved Change-Id: I9fe4fa56693f8e3a1efd47294ecb7e0e5588b9b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188851 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index 948a39861d29..ffe22f1ef294 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -985,7 +985,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) aResults.push_back(aRow); aRow[1] = new ORowSetValueDecorator(u"SYSTEM TABLE"_ustr); - aResults.push_back(aRow); + aResults.push_back(std::move(aRow)); pResultSet->setRows(std::move(aResults)); return pResultSet; diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx index ed35df71468e..ccc13b742f8a 100644 --- a/cui/source/dialogs/AdditionsDialog.cxx +++ b/cui/source/dialogs/AdditionsDialog.cxx @@ -300,9 +300,9 @@ void SearchAndParseThread::Append(AdditionInfo& additionInfo) SolarMutexGuard aGuard; - auto newItem = std::make_shared<AdditionsItem>(m_pAdditionsDialog->m_xContentGrid.get(), - m_pAdditionsDialog, additionInfo); - m_pAdditionsDialog->m_aAdditionsItems.push_back(newItem); + m_pAdditionsDialog->m_aAdditionsItems.push_back(std::make_shared<AdditionsItem>( + m_pAdditionsDialog->m_xContentGrid.get(), m_pAdditionsDialog, additionInfo)); + std::shared_ptr<AdditionsItem> aCurrentItem = m_pAdditionsDialog->m_aAdditionsItems.back(); LoadImage(aPreviewFile, aCurrentItem); diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index 7b5b6d152cfc..59b3bb492cc9 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -1474,7 +1474,7 @@ sal_Int32 OTableController::getFirstEmptyRowPosition() auto pTabEdRow = std::make_shared<OTableRow>(); pTabEdRow->SetReadOnly(bReadRow); nRet = m_vRowList.size(); - m_vRowList.push_back( pTabEdRow); + m_vRowList.push_back(std::move(pTabEdRow)); } return nRet; } diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx index 507ab05b5d0c..9aa450d9ba1b 100644 --- a/helpcompiler/source/HelpLinker.cxx +++ b/helpcompiler/source/HelpLinker.cxx @@ -501,7 +501,7 @@ void HelpLinker::main( std::vector<std::string> &args, std::string token; fileReader >> token; if (!token.empty()) - stringList.push_back(token); + stringList.push_back(std::move(token)); } fileReader.close(); diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx index a681db1f55bc..00f248e109af 100644 --- a/opencl/source/openclwrapper.cxx +++ b/opencl/source/openclwrapper.cxx @@ -214,7 +214,7 @@ std::vector<std::shared_ptr<osl::File> > binaryGenerated( const char * clFileNam auto pNewFile = std::make_shared<osl::File>(OStringToOUString(fileName, RTL_TEXTENCODING_UTF8)); if(pNewFile->open(osl_File_OpenFlag_Read) == osl::FileBase::E_None) { - aGeneratedFiles.push_back(pNewFile); + aGeneratedFiles.push_back(std::move(pNewFile)); SAL_INFO("opencl.file", "Opening binary file '" << fileName << "' for reading: success"); } else diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index 793d33d8fe4e..e53575aac10c 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -286,7 +286,7 @@ namespace sfx2 lcl_ReadFilterClass( m_aClassesNode, _rName, aClass ); // insert the class descriptor - m_rClasses.push_back( aClass ); + m_rClasses.push_back(std::move(aClass)); } }; diff --git a/slideshow/source/engine/slide/userpaintoverlay.cxx b/slideshow/source/engine/slide/userpaintoverlay.cxx index 460e5c5de00a..754e8b54cb22 100644 --- a/slideshow/source/engine/slide/userpaintoverlay.cxx +++ b/slideshow/source/engine/slide/userpaintoverlay.cxx @@ -383,7 +383,7 @@ namespace slideshow::internal pPolyPoly->setStrokeWidth(mnStrokeWidth); pPolyPoly->setRGBALineColor( maStrokeColor.getIntegerColor() ); pPolyPoly->draw(); - maPolygons.push_back(pPolyPoly); + maPolygons.push_back(std::move(pPolyPoly)); } } diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index d8e193cd7b4e..22100e84aac1 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -1647,7 +1647,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, pCurrAct, nActionNum ); // add aTotalComponents as a new entry to aCCList - aCCList.push_back( aTotalComponents ); + aCCList.push_back(std::move(aTotalComponents)); SAL_WARN_IF( aTotalComponents.aComponentList.empty(), "vcl", "Printer::GetPreparedMetaFile empty component" ); diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx index 7b9bdaf2daf4..1e44744b0773 100644 --- a/xmlsecurity/source/helper/xsecsign.cxx +++ b/xmlsecurity/source/helper/xsecsign.cxx @@ -275,7 +275,7 @@ void XSecController::setDate( { InternalSignatureInformation isi(nSecurityId, nullptr); isi.signatureInfor.stDateTime = rDateTime; - m_vInternalSignatureInformations.push_back( isi ); + m_vInternalSignatureInformations.push_back(std::move(isi)); } else {