diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-08 09:16:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-08 21:23:59 +0200 |
commit | 1cf57765dd9a66982ecf9cd33687005a70c70c3f (patch) | |
tree | c1658b2df36e37bae056cbfc73e6cc6f652c45cf /connectivity/source | |
parent | 36d43d4637ed6c1666617ac2d87f738bc34455af (diff) |
loplugin:moveparam in connectivity
Change-Id: Ie5c2f6ec1573ab2c47218dd4da8c9150b23bcd2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123247
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source')
17 files changed, 43 insertions, 43 deletions
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx index 3413079e1a0a..9a73d10b7a86 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx @@ -143,9 +143,9 @@ Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes()); } -void ODatabaseMetaDataResultSet::setRows(const ORows& _rRows) +void ODatabaseMetaDataResultSet::setRows(ORows&& _rRows) { - m_aRows = _rRows; + m_aRows = std::move(_rRows); m_bBOF = true; m_bEOF = m_aRows.empty(); } @@ -822,7 +822,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA } aRowsToSet.push_back(aRowToSet); } // for (; pRowsIter != pRowsEnd;++pRowsIter - setRows(aRowsToSet); + setRows(std::move(aRowsToSet)); } // XServiceInfo diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx index 325d0ff067c8..173f87987659 100644 --- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx +++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx @@ -164,7 +164,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) } } rtl::Reference<::connectivity::ODatabaseMetaDataResultSet> pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo); - pResult->setRows(m_aTypeInfoRows); + pResult->setRows(std::vector(m_aTypeInfoRows)); return pResult; } diff --git a/connectivity/source/commontools/TPrivilegesResultSet.cxx b/connectivity/source/commontools/TPrivilegesResultSet.cxx index 54bfb37d7034..928e9c016a73 100644 --- a/connectivity/source/commontools/TPrivilegesResultSet.cxx +++ b/connectivity/source/commontools/TPrivilegesResultSet.cxx @@ -74,7 +74,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& aRow[6] = new ORowSetValueDecorator(OUString("REFERENCE")); aRows.push_back(aRow); - setRows(aRows); + setRows(std::move(aRows)); } osl_atomic_decrement( &m_refCount ); } diff --git a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx index a60afbd6f131..b3f319203834 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx @@ -347,7 +347,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( aRows.push_back(aRow); aRow[6] = ::connectivity::ODatabaseMetaDataResultSet::getDropValue(); aRows.push_back(aRow); - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); } return xRef; diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index 04945e71de6c..31798f5bafd0 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -209,7 +209,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( } } - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } diff --git a/connectivity/source/drivers/component/CDatabaseMetaData.cxx b/connectivity/source/drivers/component/CDatabaseMetaData.cxx index cb5d1dcab4eb..781e75d5f0b7 100644 --- a/connectivity/source/drivers/component/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/component/CDatabaseMetaData.cxx @@ -115,7 +115,7 @@ Reference< XResultSet > OComponentDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); } - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } @@ -207,7 +207,7 @@ Reference< XResultSet > SAL_CALL OComponentDatabaseMetaData::getColumns( } rtl::Reference<ODatabaseMetaDataResultSet> pResult = new ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns); - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index 601f1585eaef..2f0dc0a8e85a 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -147,7 +147,7 @@ Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); } - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } @@ -245,7 +245,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getColumns( throw WrappedTargetRuntimeException(e.Message, e.Context, e.TargetException); } rtl::Reference<::connectivity::ODatabaseMetaDataResultSet> pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns); - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } @@ -316,7 +316,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo( } rtl::Reference<::connectivity::ODatabaseMetaDataResultSet> pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eIndexInfo); - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index 0e98a5944a3e..a671ceb233a8 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx @@ -996,7 +996,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTableTypes( ) aRows.push_back( { ODatabaseMetaDataResultSet::getEmptyValue(), new ORowSetValueDecorator(OUString(sTableTypes[i])) }); } // here we set the rows at the resultset - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } @@ -1042,7 +1042,7 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) tmp.push_back(aRow); return tmp; }(); - pResultSet->setRows(aRows); + pResultSet->setRows(std::move(aRows)); return pResultSet; } @@ -1201,7 +1201,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( } } - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 47777549fa78..f6480744e665 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -304,7 +304,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( } } - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } @@ -425,7 +425,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( } } - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } @@ -624,7 +624,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) { aRows.push_back( { ODatabaseMetaDataResultSet::getEmptyValue(), new ORowSetValueDecorator(OUString("TABLE")) } ); } - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index 3c751f0d1ee4..1fde6881de12 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -453,10 +453,10 @@ void OStatement_Base::initializeResultSet(OResultSet* _pResult) GetAssignValues(); _pResult->setSqlAnalyzer(m_pSQLAnalyzer.get()); - _pResult->setOrderByColumns(m_aOrderbyColumnNumber); - _pResult->setOrderByAscending(m_aOrderbyAscending); + _pResult->setOrderByColumns(std::vector(m_aOrderbyColumnNumber)); + _pResult->setOrderByAscending(std::vector(m_aOrderbyAscending)); _pResult->setBindingRow(m_aRow); - _pResult->setColumnMapping(m_aColMapping); + _pResult->setColumnMapping(std::vector(m_aColMapping)); _pResult->setEvaluationRow(m_aEvaluateRow); _pResult->setAssignValues(m_aAssignValues); _pResult->setSelectRow(m_aSelectRow); diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index eff8097e25bd..8f581dd2505c 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -801,7 +801,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) aRow[1] = new ORowSetValueDecorator(OUString("SYSTEM TABLE")); aResults.push_back(aRow); - pResultSet->setRows(aResults); + pResultSet->setRows(std::move(aResults)); return pResultSet; } @@ -1026,7 +1026,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() tmp.push_back(aRow); return tmp; }(); - pResultSet->setRows(aResults); + pResultSet->setRows(std::move(aResults)); return pResultSet; } @@ -1099,7 +1099,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( aResults.push_back(aCurrentRow); } - pResultSet->setRows( aResults ); + pResultSet->setRows( std::move(aResults) ); return pResultSet; } @@ -1307,7 +1307,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( } rtl::Reference<ODatabaseMetaDataResultSet> pResultSet = new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eColumns); - pResultSet->setRows( aResults ); + pResultSet->setRows( std::move(aResults) ); return pResultSet; } @@ -1424,7 +1424,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( aResults.push_back(aCurrentRow); } - pResultSet->setRows( aResults ); + pResultSet->setRows( std::move(aResults) ); return pResultSet; } @@ -1552,7 +1552,7 @@ uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool bIsImport aResults.push_back(aCurrentRow); } - pResultSet->setRows( aResults ); + pResultSet->setRows( std::move(aResults) ); return pResultSet; } @@ -1606,7 +1606,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( } rtl::Reference<ODatabaseMetaDataResultSet> pResultSet = new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::ePrimaryKeys); - pResultSet->setRows( aResults ); + pResultSet->setRows( std::move(aResults) ); return pResultSet; } @@ -1699,7 +1699,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( } rtl::Reference<ODatabaseMetaDataResultSet> pResultSet = new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::ePrimaryKeys); - pResultSet->setRows( aResults ); + pResultSet->setRows( std::move(aResults) ); return pResultSet; } @@ -1774,7 +1774,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( aResults.push_back(aRow); } - pResultSet->setRows( aResults ); + pResultSet->setRows( std::move(aResults) ); return pResultSet; } diff --git a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx index e8f9bdcabd50..0580f0381a85 100644 --- a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx +++ b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx @@ -141,7 +141,7 @@ Reference< XResultSet > OFlatDatabaseMetaData::impl_getTypeInfo_throw( ) return tmp; }(); - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } @@ -229,7 +229,7 @@ Reference< XResultSet > SAL_CALL OFlatDatabaseMetaData::getColumns( } rtl::Reference<::connectivity::ODatabaseMetaDataResultSet> pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns); - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx index 39bacf0e3d2c..bd2f8470a2a9 100644 --- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx @@ -481,7 +481,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTablePrivileges( aRows.push_back(aRow); } - pNewPrivRes->setRows(aRows); + pNewPrivRes->setRows(std::move(aRows)); } } } diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx index d22a6f042574..5c55fa60d54b 100644 --- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx @@ -747,7 +747,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes( ) tmp.push_back(aRow); return tmp; }(); - pResult->setRows(aRows); + pResult->setRows(std::vector(aRows)); return pResult; } @@ -804,7 +804,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTypeInfo( ) return tmp; }(); - pResult->setRows(aRows); + pResult->setRows(std::vector(aRows)); return pResult; } @@ -907,7 +907,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns( } } } - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } @@ -968,7 +968,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables( } return tmp; }(); - pResult->setRows(aRows); + pResult->setRows(std::vector(aRows)); return pResult; } @@ -1012,7 +1012,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getVersionColumns( aRows.push_back(aRow); } - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } diff --git a/connectivity/source/drivers/writer/WDatabaseMetaData.cxx b/connectivity/source/drivers/writer/WDatabaseMetaData.cxx index 99c81b7c2840..e9b230be3fb5 100644 --- a/connectivity/source/drivers/writer/WDatabaseMetaData.cxx +++ b/connectivity/source/drivers/writer/WDatabaseMetaData.cxx @@ -102,7 +102,7 @@ uno::Reference<sdbc::XResultSet> SAL_CALL OWriterDatabaseMetaData::getTables( } } - pResult->setRows(aRows); + pResult->setRows(std::move(aRows)); return pResult; } diff --git a/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx b/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx index 413d073b0ac6..c469f06716a7 100644 --- a/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx +++ b/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx @@ -145,7 +145,7 @@ namespace connectivity /// construction of a pre-defined result set type ODatabaseMetaDataResultSet( MetaDataResultSetType _eType ); - void setRows(const ORows& _rRows); + void setRows(ORows&& _rRows); // XServiceInfo diff --git a/connectivity/source/inc/file/FResultSet.hxx b/connectivity/source/inc/file/FResultSet.hxx index 84ed7067b125..71d222d82030 100644 --- a/connectivity/source/inc/file/FResultSet.hxx +++ b/connectivity/source/inc/file/FResultSet.hxx @@ -265,11 +265,11 @@ namespace connectivity::file m_aSelectRow = _rRow; m_nColumnCount = m_aSelectRow->size(); } - void setColumnMapping(const std::vector<sal_Int32>& _aColumnMapping) { m_aColMapping = _aColumnMapping; } + void setColumnMapping(std::vector<sal_Int32>&& _aColumnMapping) { m_aColMapping = std::move(_aColumnMapping); } void setSqlAnalyzer(OSQLAnalyzer* _pSQLAnalyzer) { m_pSQLAnalyzer = _pSQLAnalyzer; } - void setOrderByColumns(const std::vector<sal_Int32>& _aColumnOrderBy) { m_aOrderbyColumnNumber = _aColumnOrderBy; } - void setOrderByAscending(const std::vector<TAscendingOrder>& _aOrderbyAsc) { m_aOrderbyAscending = _aOrderbyAsc; } + void setOrderByColumns(std::vector<sal_Int32>&& _aColumnOrderBy) { m_aOrderbyColumnNumber = std::move(_aColumnOrderBy); } + void setOrderByAscending(std::vector<TAscendingOrder>&& _aOrderbyAsc) { m_aOrderbyAscending = std::move(_aOrderbyAsc); } void setMetaData(const css::uno::Reference< css::sdbc::XResultSetMetaData>& _xMetaData) { m_xMetaData = _xMetaData;} static void setBoundedColumns(const OValueRefRow& _rRow, |