dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 2 +- dbaccess/source/core/misc/DatabaseDataProvider.cxx | 2 +- dbaccess/source/ui/app/AppControllerDnD.cxx | 2 +- dbaccess/source/ui/app/AppControllerGen.cxx | 2 +- dbaccess/source/ui/querydesign/JoinTableView.cxx | 2 +- dbaccess/source/ui/relationdesign/RelationTableView.cxx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 681c7292b280b978a03faba74417207381bea0b2 Author: Noel Grandin <[email protected]> AuthorDate: Fri Nov 8 12:38:13 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Nov 11 10:58:19 2024 +0100 clang-tidy: performance-unnecessary-copy-initialization in dbaccess Change-Id: If72f9eea59e5f2a4e183b98888a037ea26333cb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176377 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 3608286d36e8..c8c6f7ecbd2a 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -926,7 +926,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) // we can now only look if we found it under the realname property // here we have to make the assumption that the position is correct OSQLColumns::Vector::const_iterator aFind2 = aSelectColumns->begin() + i-1; - Reference<XPropertySet> xProp = *aFind2; + const Reference<XPropertySet>& xProp = *aFind2; if ( !xProp.is() || !xProp->getPropertySetInfo()->hasPropertyByName( PROPERTY_REALNAME ) ) continue; diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index 62bb741f6b2d..8bf661362cd4 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -661,7 +661,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(bool _bHasCategor const sal_Int32 nCount = aImposedColumnNames.getLength(); for ( sal_Int32 i = 0 ; i < nCount; ++i ) { - const OUString sColumnName( aImposedColumnNames[i] ); + const OUString& sColumnName( aImposedColumnNames[i] ); if ( !xColumns->hasByName( sColumnName ) ) continue; diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index 53605f046710..73af7c3514cf 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -92,7 +92,7 @@ void OApplicationController::deleteTables(const std::vector< OUString>& _rList) std::vector< OUString>::const_iterator aEnd = _rList.end(); for (std::vector< OUString>::const_iterator aIter = _rList.begin(); aIter != aEnd; ++aIter) { - OUString sTableName = *aIter; + const OUString& sTableName = *aIter; sal_Int32 nResult = RET_YES; if ( bConfirm ) diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 16bec3e3689d..ae5466655386 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -102,7 +102,7 @@ void OApplicationController::convertToView(const OUString& _sName) OSaveAsDlg aDlg(getFrameWeld(), CommandType::TABLE, getORB(), xConnection, aDefaultName, aNameChecker, SADFlags::NONE); if (aDlg.run() == RET_OK) { - OUString sName = aDlg.getName(); + const OUString& sName = aDlg.getName(); OUString sCatalog = aDlg.getCatalog(); OUString sSchema = aDlg.getSchema(); OUString sNewName( diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 3bfa4d4bbf1c..246e854203e6 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -491,7 +491,7 @@ bool OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize) void OJoinTableView::EnsureVisible(const OTableWindow* _pWin) { // data about the tab win - TTableWindowData::value_type pData = _pWin->GetData(); + const TTableWindowData::value_type& pData = _pWin->GetData(); EnsureVisible( pData->GetPosition() , pData->GetSize()); Invalidate(InvalidateFlags::NoChildren); } diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index c2c07ceb710c..caa4e6534618 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -99,7 +99,7 @@ void ORelationTableView::ReSync() TTableWindowData::const_reverse_iterator aIter = rTabWinDataList.rbegin(); for(;aIter != rTabWinDataList.rend();++aIter) { - TTableWindowData::value_type pData = *aIter; + const TTableWindowData::value_type& pData = *aIter; VclPtr<OTableWindow> pTabWin = createWindow(pData); if (!pTabWin->Init())
