[Libreoffice-commits] core.git: comphelper/source connectivity/source desktop/source include/comphelper include/connectivity ucb/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Oct 6 19:17:39 UTC 2021


 comphelper/source/misc/interaction.cxx                                  |    4 +-
 connectivity/source/commontools/TSortIndex.cxx                          |    8 ++--
 connectivity/source/commontools/dbtools.cxx                             |    5 +-
 connectivity/source/commontools/parameters.cxx                          |    2 -
 connectivity/source/commontools/paramwrapper.cxx                        |    4 +-
 connectivity/source/drivers/file/FResultSet.cxx                         |    2 -
 connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx         |    6 +--
 connectivity/source/drivers/postgresql/pq_array.cxx                     |    2 -
 connectivity/source/drivers/postgresql/pq_array.hxx                     |    4 +-
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx          |   18 +++++-----
 connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx         |   10 ++---
 connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx         |    4 +-
 connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx |    4 +-
 connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.hxx |    2 -
 connectivity/source/drivers/postgresql/pq_updateableresultset.cxx       |    2 -
 connectivity/source/drivers/postgresql/pq_updateableresultset.hxx       |   10 ++---
 connectivity/source/drivers/postgresql/pq_xcontainer.cxx                |    6 +--
 connectivity/source/inc/TSortIndex.hxx                                  |    4 +-
 connectivity/source/inc/odbc/OResultSetMetaData.hxx                     |    4 +-
 connectivity/source/manager/mdrivermanager.cxx                          |    8 ++--
 desktop/source/deployment/misc/dp_interact.cxx                          |    2 -
 include/comphelper/interaction.hxx                                      |    2 -
 include/connectivity/paramwrapper.hxx                                   |    2 -
 ucb/source/ucp/file/filinsreq.cxx                                       |    2 -
 ucb/source/ucp/ftp/ftpintreq.cxx                                        |    2 -
 25 files changed, 60 insertions(+), 59 deletions(-)

New commits:
commit 7c3990c38ddc5e69c89d9cb0c1a521f144e852f7
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Oct 6 19:42:52 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 6 21:17:01 2021 +0200

    loplugin:moveparam in connectivity
    
    Change-Id: Iaf3a64effb69fd82c6303d8fa75723ccc5ced543
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123183
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/comphelper/source/misc/interaction.cxx b/comphelper/source/misc/interaction.cxx
index 5a24075504b7..e1fd64d9b04b 100644
--- a/comphelper/source/misc/interaction.cxx
+++ b/comphelper/source/misc/interaction.cxx
@@ -36,9 +36,9 @@ namespace comphelper
     }
 
     OInteractionRequest::OInteractionRequest(const Any& rRequestDescription,
-            std::vector<Reference<XInteractionContinuation>> const& rContinuations)
+            std::vector<Reference<XInteractionContinuation>>&& rContinuations)
         : m_aRequest(rRequestDescription)
-        , m_aContinuations(rContinuations)
+        , m_aContinuations(std::move(rContinuations))
     {
     }
 
diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx
index 6b94216a3719..44a883dc86c4 100644
--- a/connectivity/source/commontools/TSortIndex.cxx
+++ b/connectivity/source/commontools/TSortIndex.cxx
@@ -94,10 +94,10 @@ struct TKeyValueFunc
     return pKeySet;
 }
 
-OSortIndex::OSortIndex( const std::vector<OKeyType>& _aKeyType,
-                        const std::vector<TAscendingOrder>& _aAscending)
-    :m_aKeyType(_aKeyType)
-    ,m_aAscending(_aAscending)
+OSortIndex::OSortIndex( std::vector<OKeyType>&& _aKeyType,
+                        std::vector<TAscendingOrder>&& _aAscending)
+    :m_aKeyType(std::move(_aKeyType))
+    ,m_aAscending(std::move(_aAscending))
     ,m_bFrozen(false)
 {
 }
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index e5e5dcdabbb3..40a07679ba96 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1633,7 +1633,8 @@ namespace
         std::vector<bool, std::allocator<bool> >       m_aSet;
         Reference<XIndexAccess> m_xSource;
     public:
-        OParameterWrapper(const std::vector<bool, std::allocator<bool> >& _aSet,const Reference<XIndexAccess>& _xSource) : m_aSet(_aSet),m_xSource(_xSource){}
+        OParameterWrapper(std::vector<bool, std::allocator<bool> >&& _aSet,const Reference<XIndexAccess>& _xSource)
+            : m_aSet(std::move(_aSet)), m_xSource(_xSource) {}
     private:
         // css::container::XElementAccess
         virtual Type SAL_CALL getElementType() override
@@ -1717,7 +1718,7 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer,
     rtl::Reference<OParameterContinuation> pParams = new OParameterContinuation;
     // the request
     ParametersRequest aRequest;
-    Reference<XIndexAccess> xWrappedParameters = new OParameterWrapper(aNewParameterSet,xParamsAsIndicies);
+    Reference<XIndexAccess> xWrappedParameters = new OParameterWrapper(std::move(aNewParameterSet),xParamsAsIndicies);
     aRequest.Parameters = xWrappedParameters;
     aRequest.Connection = _xConnection;
     rtl::Reference<OInteractionRequest> pRequest = new OInteractionRequest(makeAny(aRequest));
diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index a0b0b57958fc..7c45350c0023 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -480,7 +480,7 @@ namespace dbtools
             // property, but the parameter listeners expect such a property. So we need an object "aggregating"
             // xParam and supplying an additional property ("Value")
             // (it's no real aggregation of course...)
-            m_pOuterParameters->push_back( new param::ParameterWrapper( aParam.second.xComposerColumn, m_xInnerParamUpdate, aParam.second.aInnerIndexes ) );
+            m_pOuterParameters->push_back( new param::ParameterWrapper( aParam.second.xComposerColumn, m_xInnerParamUpdate, std::vector(aParam.second.aInnerIndexes) ) );
         }
 
 #if OSL_DEBUG_LEVEL > 0
diff --git a/connectivity/source/commontools/paramwrapper.cxx b/connectivity/source/commontools/paramwrapper.cxx
index 0aca56b65123..a914115d895b 100644
--- a/connectivity/source/commontools/paramwrapper.cxx
+++ b/connectivity/source/commontools/paramwrapper.cxx
@@ -75,9 +75,9 @@ namespace dbtools::param
 
 
     ParameterWrapper::ParameterWrapper( const Reference< XPropertySet >& _rxColumn,
-            const Reference< XParameters >& _rxAllParameters, const std::vector< sal_Int32 >& _rIndexes )
+            const Reference< XParameters >& _rxAllParameters, std::vector< sal_Int32 >&& _rIndexes )
         :PropertyBase( m_aBHelper )
-        ,m_aIndexes( _rIndexes )
+        ,m_aIndexes( std::move(_rIndexes) )
         ,m_xDelegator( _rxColumn )
         ,m_xValueDestination( _rxAllParameters )
     {
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 56ed6134c387..930c5c2f7b98 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1136,7 +1136,7 @@ void OResultSet::sortRows()
         ++i;
     }
 
-    m_pSortIndex.reset(new OSortIndex(eKeyType,m_aOrderbyAscending));
+    m_pSortIndex.reset(new OSortIndex(std::move(eKeyType), std::vector(m_aOrderbyAscending)));
 
     while ( ExecuteRow( IResultSetHelper::NEXT, 1, false ) )
     {
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index 576c3d3e9bef..ae6eeb4fddeb 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -881,7 +881,7 @@ void ODatabaseMetaDataResultSet::openTablesTypes( )
     m_aColMapping.clear();
     m_aColMapping.push_back(-1);
     m_aColMapping.push_back(4);
-    m_xMetaData = new OResultSetMetaData(m_pConnection.get(),m_aStatementHandle,m_aColMapping);
+    m_xMetaData = new OResultSetMetaData(m_pConnection.get(),m_aStatementHandle,std::vector(m_aColMapping));
     checkColumnCount();
 }
 
@@ -898,7 +898,7 @@ void ODatabaseMetaDataResultSet::openCatalogs()
     m_aColMapping.clear();
     m_aColMapping.push_back(-1);
     m_aColMapping.push_back(1);
-    m_xMetaData = new OResultSetMetaData(m_pConnection.get(),m_aStatementHandle,m_aColMapping);
+    m_xMetaData = new OResultSetMetaData(m_pConnection.get(),m_aStatementHandle,std::vector(m_aColMapping));
     checkColumnCount();
 }
 
@@ -914,7 +914,7 @@ void ODatabaseMetaDataResultSet::openSchemas()
     m_aColMapping.clear();
     m_aColMapping.push_back(-1);
     m_aColMapping.push_back(2);
-    m_xMetaData = new OResultSetMetaData(m_pConnection.get(),m_aStatementHandle,m_aColMapping);
+    m_xMetaData = new OResultSetMetaData(m_pConnection.get(),m_aStatementHandle,std::vector(m_aColMapping));
     checkColumnCount();
 }
 
diff --git a/connectivity/source/drivers/postgresql/pq_array.cxx b/connectivity/source/drivers/postgresql/pq_array.cxx
index 5ae646f230e3..841ed70c6cb2 100644
--- a/connectivity/source/drivers/postgresql/pq_array.cxx
+++ b/connectivity/source/drivers/postgresql/pq_array.cxx
@@ -100,7 +100,7 @@ css::uno::Reference< css::sdbc::XResultSet > Array::getResultSetAtIndex(
     }
 
     return new SequenceResultSet(
-        m_xMutex, m_owner, getStatics().resultSetArrayColumnNames, ret, m_tc );
+        m_xMutex, m_owner, std::vector(getStatics().resultSetArrayColumnNames), std::move(ret), m_tc );
 }
 
 
diff --git a/connectivity/source/drivers/postgresql/pq_array.hxx b/connectivity/source/drivers/postgresql/pq_array.hxx
index b42e6689b93b..b847d646a913 100644
--- a/connectivity/source/drivers/postgresql/pq_array.hxx
+++ b/connectivity/source/drivers/postgresql/pq_array.hxx
@@ -54,10 +54,10 @@ class Array : public cppu::WeakImplHelper< css::sdbc::XArray >
 public:
     Array(
         const rtl::Reference< comphelper::RefCountedMutex > & mutex,
-        const std::vector< css::uno::Any > & data,
+        std::vector< css::uno::Any > && data,
         const css::uno::Reference< css::uno::XInterface > & owner,
         const css::uno::Reference< css::script::XTypeConverter > &tc) :
-        m_data( data ),
+        m_data( std::move(data) ),
         m_owner( owner ),
         m_tc( tc ),
         m_xMutex( mutex )
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index b6b7b44482bd..cec939dc40f3 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1179,7 +1179,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getTables(
         closeable->close();
 
     return new SequenceResultSet(
-        m_xMutex, *this, statics.tablesRowNames, vec, m_pSettings->tc );
+        m_xMutex, *this, std::vector(statics.tablesRowNames), std::move(vec), m_pSettings->tc );
 }
 
 namespace
@@ -1262,7 +1262,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getSchemas(  )
     if( closeable.is() )
         closeable->close();
     return new SequenceResultSet(
-        m_xMutex, *this, getStatics().schemaNames, vec, m_pSettings->tc );
+        m_xMutex, *this, std::vector(getStatics().schemaNames), std::move(vec), m_pSettings->tc );
 }
 
 css::uno::Reference< XResultSet > DatabaseMetaData::getCatalogs(  )
@@ -1279,7 +1279,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getTableTypes(  )
     // LEM TODO: this can be made dynamic, see JDBC driver
     MutexGuard guard( m_xMutex->GetMutex() );
     return new SequenceResultSet(
-        m_xMutex, *this, getStatics().tableTypeNames, getStatics().tableTypeData,
+        m_xMutex, *this, std::vector(getStatics().tableTypeNames), std::vector(getStatics().tableTypeData),
         m_pSettings->tc );
 }
 
@@ -1599,7 +1599,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getColumns(
         closeable->close();
 
     return new SequenceResultSet(
-        m_xMutex, *this, statics.columnRowNames, vec, m_pSettings->tc );
+        m_xMutex, *this, std::vector(statics.columnRowNames), std::move(vec), m_pSettings->tc );
 }
 
 css::uno::Reference< XResultSet > DatabaseMetaData::getColumnPrivileges(
@@ -1782,7 +1782,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getPrimaryKeys(
         elements ++;
     }
     return new SequenceResultSet(
-        m_xMutex, *this, getStatics().primaryKeyNames, ret, m_pSettings->tc );
+        m_xMutex, *this, std::vector(getStatics().primaryKeyNames), std::move(ret), m_pSettings->tc );
 }
 
 // Copied / adapted / simplified from JDBC driver
@@ -2298,8 +2298,8 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getTypeInfo(  )
     return new SequenceResultSet(
         m_xMutex,
         *this,
-        getStatics().typeinfoColumnNames,
-        vec,
+        std::vector(getStatics().typeinfoColumnNames),
+        std::move(vec),
         m_pSettings->tc,
         &( getStatics().typeInfoMetaData ));
 }
@@ -2423,8 +2423,8 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getIndexInfo(
         }
     }
     return new SequenceResultSet(
-        m_xMutex, *this, getStatics().indexinfoColumnNames,
-        vec,
+        m_xMutex, *this, std::vector(getStatics().indexinfoColumnNames),
+        std::move(vec),
         m_pSettings->tc );
 }
 
diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx b/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx
index 02030729ad73..defb99906048 100644
--- a/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx
@@ -65,17 +65,17 @@ Any SequenceResultSet::getValue( sal_Int32 columnIndex )
 SequenceResultSet::SequenceResultSet(
     const ::rtl::Reference< comphelper::RefCountedMutex > & mutex,
     const css::uno::Reference< css::uno::XInterface > &owner,
-    const std::vector< OUString > &colNames,
-    const std::vector< std::vector< Any > > &data,
+    std::vector< OUString >&& colNames,
+    std::vector< std::vector< Any > >&& data,
     const Reference< css::script::XTypeConverter > & tc,
     const ColumnMetaDataVector *pVec) :
     BaseResultSet( mutex, owner, data.size(), colNames.size(), tc ),
-    m_data(data ),
-    m_columnNames( colNames )
+    m_data(std::move(data) ),
+    m_columnNames( std::move(colNames) )
 {
     if( pVec )
     {
-        m_meta = new SequenceResultSetMetaData( *pVec, m_columnNames.size() );
+        m_meta = new SequenceResultSetMetaData( std::vector(*pVec), m_columnNames.size() );
     }
 }
 
diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx b/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx
index 346adc594ce9..64ac212b6b76 100644
--- a/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx
+++ b/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx
@@ -71,8 +71,8 @@ public:
     SequenceResultSet(
         const ::rtl::Reference< comphelper::RefCountedMutex > & mutex,
         const css::uno::Reference< css::uno::XInterface > &owner,
-        const std::vector< OUString > &colNames,
-        const std::vector< std::vector< css::uno::Any > > &data,
+        std::vector< OUString >&& colNames,
+        std::vector< std::vector< css::uno::Any > >&& data,
         const css::uno::Reference< css::script::XTypeConverter > &tc,
         const ColumnMetaDataVector *pVec = nullptr);
     virtual ~SequenceResultSet() override;
diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx
index d45ffc0a614a..568e6bb9f49d 100644
--- a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx
@@ -46,9 +46,9 @@ namespace pq_sdbc_driver
 {
 
 SequenceResultSetMetaData::SequenceResultSetMetaData(
-    const ColumnMetaDataVector &metaDataVector,
+    ColumnMetaDataVector&& metaDataVector,
     int colCount ) :
-    m_columnData( metaDataVector ),
+    m_columnData( std::move(metaDataVector) ),
     m_colCount( colCount )
 {
 }
diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.hxx b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.hxx
index affb7c37186d..3cd32ff66d7a 100644
--- a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.hxx
+++ b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.hxx
@@ -56,7 +56,7 @@ namespace pq_sdbc_driver
 
     public:
         SequenceResultSetMetaData(
-            const ColumnMetaDataVector &vec,
+            ColumnMetaDataVector&& vec,
             int colCount );
 
     public:
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
index 8c5fdd3c8965..e0373d265adf 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
@@ -120,7 +120,7 @@ css::uno::Reference< css::sdbc::XCloseable > UpdateableResultSet::createFromPGRe
     }
 
     rtl::Reference<UpdateableResultSet> pRS =  new UpdateableResultSet(
-        mutex, owner, columnNames, data, ppSettings, schema, table, primaryKey );
+        mutex, owner, std::move(columnNames), std::move(data), ppSettings, schema, table, std::vector(primaryKey) );
 
     pRS->m_meta = new ResultSetMetaData( mutex, pRS,nullptr, ppSettings, result, schema, table );
 
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
index aa800bb4a701..afe385a15ec0 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
@@ -75,17 +75,17 @@ private:
     UpdateableResultSet(
         const ::rtl::Reference< comphelper::RefCountedMutex > & mutex,
         const css::uno::Reference< css::uno::XInterface > &owner,
-        const std::vector< OUString > &colNames,
-        const std::vector< std::vector< css::uno::Any > > &data,
+        std::vector< OUString >&& colNames,
+        std::vector< std::vector< css::uno::Any > >&& data,
         ConnectionSettings **ppSettings,
         const OUString &schema,
         const OUString &table,
-        const std::vector< OUString > &primaryKey)
-        : SequenceResultSet( mutex, owner, colNames, data, (*ppSettings)->tc ),
+        std::vector< OUString >&& primaryKey)
+        : SequenceResultSet( mutex, owner, std::move(colNames), std::move(data), (*ppSettings)->tc ),
           m_ppSettings( ppSettings ),
           m_schema( schema ),
           m_table( table ),
-          m_primaryKey( primaryKey ),
+          m_primaryKey( std::move(primaryKey) ),
           m_insertRow( false )
     {
         // LEM TODO: this duplicates code in pq_resultset.cxx, except for different value
diff --git a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx
index 06323615f4b7..6f368a5290c8 100644
--- a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx
@@ -211,8 +211,8 @@ class ContainerEnumeration : public ::cppu::WeakImplHelper< XEnumeration >
     std::vector< css::uno::Any > m_vec;
     sal_Int32 m_index;
 public:
-    explicit ContainerEnumeration( const std::vector< css::uno::Any > &vec )
-        : m_vec( vec ),
+    explicit ContainerEnumeration( std::vector< css::uno::Any >&& vec )
+        : m_vec( std::move(vec) ),
           m_index( -1 )
     {}
 
@@ -243,7 +243,7 @@ css::uno::Any ContainerEnumeration::nextElement()
 
 Reference< XEnumeration > Container::createEnumeration(  )
 {
-    return new ContainerEnumeration( m_values );
+    return new ContainerEnumeration( std::vector(m_values) );
 }
 
 void Container::addRefreshListener(
diff --git a/connectivity/source/inc/TSortIndex.hxx b/connectivity/source/inc/TSortIndex.hxx
index efd518d2ed59..3ac339f7e9f0 100644
--- a/connectivity/source/inc/TSortIndex.hxx
+++ b/connectivity/source/inc/TSortIndex.hxx
@@ -57,8 +57,8 @@ namespace connectivity
 
     public:
 
-        OSortIndex( const std::vector<OKeyType>& _aKeyType,
-                    const std::vector<TAscendingOrder>& _aAscending);
+        OSortIndex( std::vector<OKeyType>&& _aKeyType,
+                    std::vector<TAscendingOrder>&& _aAscending);
         OSortIndex(OSortIndex const &) = delete; // MSVC2015 workaround
         OSortIndex& operator=(OSortIndex const &) = delete; // MSVC2015 workaround
 
diff --git a/connectivity/source/inc/odbc/OResultSetMetaData.hxx b/connectivity/source/inc/odbc/OResultSetMetaData.hxx
index 26244a61e0f9..6c1acc13bfb9 100644
--- a/connectivity/source/inc/odbc/OResultSetMetaData.hxx
+++ b/connectivity/source/inc/odbc/OResultSetMetaData.hxx
@@ -58,8 +58,8 @@ namespace connectivity::odbc
                 ,m_nColCount(-1)
                 ,m_bUseODBC2Types(false)
             {}
-            OResultSetMetaData(OConnection* _pConnection, SQLHANDLE _pStmt ,const std::vector<sal_Int32> & _vMapping)
-                    :m_vMapping(_vMapping)
+            OResultSetMetaData(OConnection* _pConnection, SQLHANDLE _pStmt, std::vector<sal_Int32>&& _vMapping)
+                    :m_vMapping(std::move(_vMapping))
                     ,m_aStatementHandle( _pStmt )
                     ,m_pConnection(_pConnection)
                     ,m_nColCount(_vMapping.size()-1)
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index 92f1dccdc0ba..c48d3b9c06f9 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -68,7 +68,7 @@ class ODriverEnumeration : public ::cppu::WeakImplHelper< XEnumeration >
 protected:
     virtual ~ODriverEnumeration() override;
 public:
-    explicit ODriverEnumeration(const DriverArray& _rDriverSequence);
+    explicit ODriverEnumeration(DriverArray&& _rDriverSequence);
 
 // XEnumeration
     virtual sal_Bool SAL_CALL hasMoreElements( ) override;
@@ -76,8 +76,8 @@ public:
 };
 
 
-ODriverEnumeration::ODriverEnumeration(const DriverArray& _rDriverSequence)
-    :m_aDrivers( _rDriverSequence )
+ODriverEnumeration::ODriverEnumeration(DriverArray&& _rDriverSequence)
+    :m_aDrivers( std::move(_rDriverSequence) )
     ,m_aPos( m_aDrivers.begin() )
 {
 }
@@ -492,7 +492,7 @@ Reference< XEnumeration > SAL_CALL OSDBCDriverManager::createEnumeration(  )
         ExtractDriverFromCollectionElement()    // transformation to apply (extract a driver from a driver access)
     );
 
-    return new ODriverEnumeration( aDrivers );
+    return new ODriverEnumeration( std::move(aDrivers) );
 }
 
 
diff --git a/desktop/source/deployment/misc/dp_interact.cxx b/desktop/source/deployment/misc/dp_interact.cxx
index 27a2fc075664..9c5818cc669a 100644
--- a/desktop/source/deployment/misc/dp_interact.cxx
+++ b/desktop/source/deployment/misc/dp_interact.cxx
@@ -108,7 +108,7 @@ bool interactContinuation( Any const & request,
                 new InteractionContinuationImpl(continuation, &cont ),
                 new InteractionContinuationImpl( cppu::UnoType<task::XInteractionAbort>::get(), &abort ) };
             xInteractionHandler->handle(
-                new ::comphelper::OInteractionRequest( request, conts ) );
+                new ::comphelper::OInteractionRequest( request, std::move(conts) ) );
             if (cont || abort) {
                 if (pcont != nullptr)
                     *pcont = cont;
diff --git a/include/comphelper/interaction.hxx b/include/comphelper/interaction.hxx
index b138023329fb..4c9f61948c80 100644
--- a/include/comphelper/interaction.hxx
+++ b/include/comphelper/interaction.hxx
@@ -100,7 +100,7 @@ namespace comphelper
     public:
         OInteractionRequest(const css::uno::Any& _rRequestDescription);
         OInteractionRequest(const css::uno::Any& rRequestDescription,
-            std::vector<css::uno::Reference<css::task::XInteractionContinuation>> const& rContinuations);
+            std::vector<css::uno::Reference<css::task::XInteractionContinuation>>&& rContinuations);
 
         /// add a new continuation
         void addContinuation(const css::uno::Reference< css::task::XInteractionContinuation >& _rxContinuation);
diff --git a/include/connectivity/paramwrapper.hxx b/include/connectivity/paramwrapper.hxx
index 1911431b256f..bf16e0851fcb 100644
--- a/include/connectivity/paramwrapper.hxx
+++ b/include/connectivity/paramwrapper.hxx
@@ -86,7 +86,7 @@ namespace dbtools::param
         ParameterWrapper(
             const css::uno::Reference< css::beans::XPropertySet >& _rxColumn,
             const css::uno::Reference< css::sdbc::XParameters >& _rxAllParameters,
-            const ::std::vector< sal_Int32 >& _rIndexes
+            std::vector< sal_Int32 >&& _rIndexes
         );
 
         DECLARE_XINTERFACE()
diff --git a/ucb/source/ucp/file/filinsreq.cxx b/ucb/source/ucp/file/filinsreq.cxx
index e64fbe807548..3e20f8bee68e 100644
--- a/ucb/source/ucp/file/filinsreq.cxx
+++ b/ucb/source/ucp/file/filinsreq.cxx
@@ -77,7 +77,7 @@ XInteractionRequestImpl::XInteractionRequestImpl(
         aAny <<= excep;
 
     }
-    m_xRequest.set(new ::comphelper::OInteractionRequest(aAny, continuations));
+    m_xRequest.set(new ::comphelper::OInteractionRequest(aAny, std::move(continuations)));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/ftp/ftpintreq.cxx b/ucb/source/ucp/ftp/ftpintreq.cxx
index 83201e9127c7..32c765a4e3be 100644
--- a/ucb/source/ucp/ftp/ftpintreq.cxx
+++ b/ucb/source/ucp/ftp/ftpintreq.cxx
@@ -56,7 +56,7 @@ XInteractionRequestImpl::XInteractionRequestImpl()
     };
     UnsupportedNameClashException excep;
     excep.NameClash = NameClash::ERROR;
-    m_xRequest.set(new ::comphelper::OInteractionRequest(Any(excep), continuations));
+    m_xRequest.set(new ::comphelper::OInteractionRequest(Any(excep), std::move(continuations)));
 }
 
 bool XInteractionRequestImpl::approved() const { return p1->isSelected(); }


More information about the Libreoffice-commits mailing list