diff options
Diffstat (limited to 'connectivity')
8 files changed, 15 insertions, 9 deletions
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index 8569f225b132..25492b36c43c 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -89,7 +89,7 @@ public: { } void clear() { m_pComponent = nullptr; } - void add(const OUString& _sRefName) { m_aRefNames.insert(std::map< OUString,bool>::value_type(_sRefName,true)); } + void add(const OUString& _sRefName) { m_aRefNames.emplace(_sRefName,true); } }; } namespace connectivity diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx index e5513f078055..716e5e6941f7 100644 --- a/connectivity/source/commontools/parameters.cxx +++ b/connectivity/source/commontools/parameters.cxx @@ -304,8 +304,8 @@ namespace dbtools // remember meta information about this new parameter std::pair< ParameterInformation::iterator, bool > aInsertionPos = - m_aParameterInformation.insert( - ParameterInformation::value_type( sNewParamName, ParameterMetaData( nullptr ) ) + m_aParameterInformation.emplace( + sNewParamName, ParameterMetaData( nullptr ) ); OSL_ENSURE( aInsertionPos.second, "ParameterManager::classifyLinks: there already was a parameter with this name!" ); aInsertionPos.first->second.eType = ParameterClassification::LinkedByColumnName; diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 7ff389c76bc0..4f53c25fc35c 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -307,7 +307,7 @@ namespace connectivity } pHelper.reset( new StreamHelper(storage->openStreamElement( sStrippedName, _nMode ) ) ); } - aFind->second.streams.insert(TStreamMap::value_type(sName,pHelper)); + aFind->second.streams.emplace(sName,pHelper); } catch(const Exception& e) { diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx index a22074963513..30eccc2b0ca9 100644 --- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx @@ -450,7 +450,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTablePrivileges( { if ( sPrivs[j] == sColumnName ) { - aColumnMatching.insert( std::map<sal_Int32,sal_Int32>::value_type(i,j+1) ); + aColumnMatching.emplace(i,j+1); break; } } diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx index ec9463e243dc..eac88ca27899 100644 --- a/connectivity/source/drivers/odbc/OConnection.cxx +++ b/connectivity/source/drivers/odbc/OConnection.cxx @@ -515,7 +515,7 @@ SQLHANDLE OConnection::createStatementHandle() N3SQLAllocHandle(SQL_HANDLE_STMT,pConnectionTemp->getConnection(),&aStatementHandle); ++m_nStatementCount; if(bNew) - m_aConnections.insert(std::map< SQLHANDLE,OConnection*>::value_type(aStatementHandle,pConnectionTemp)); + m_aConnections.emplace(aStatementHandle,pConnectionTemp); return aStatementHandle; diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx index 796f34a786c2..e52999a2a007 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx @@ -1287,7 +1287,10 @@ SWORD ODatabaseMetaDataResultSet::impl_getColumnType_nothrow(sal_Int32 columnInd { std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(columnIndex); if ( aFind == m_aODBCColumnTypes.end() ) - aFind = m_aODBCColumnTypes.insert(std::map<sal_Int32,SWORD>::value_type(columnIndex,OResultSetMetaData::getColumnODBCType(m_pConnection.get(),m_aStatementHandle,*this,columnIndex))).first; + aFind = m_aODBCColumnTypes.emplace( + columnIndex, + OResultSetMetaData::getColumnODBCType(m_pConnection.get(),m_aStatementHandle,*this,columnIndex) + ).first; return aFind->second; } diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index 2a27652aa9a6..dec1e86ef635 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -1814,7 +1814,10 @@ SWORD OResultSet::impl_getColumnType_nothrow(sal_Int32 columnIndex) { std::map<sal_Int32,SWORD>::const_iterator aFind = m_aODBCColumnTypes.find(columnIndex); if ( aFind == m_aODBCColumnTypes.end() ) - aFind = m_aODBCColumnTypes.insert(std::map<sal_Int32,SWORD>::value_type(columnIndex,OResultSetMetaData::getColumnODBCType(m_pStatement->getOwnConnection(),m_aStatementHandle,*this,columnIndex))).first; + aFind = m_aODBCColumnTypes.emplace( + columnIndex, + OResultSetMetaData::getColumnODBCType(m_pStatement->getOwnConnection(),m_aStatementHandle,*this,columnIndex) + ).first; return aFind->second; } diff --git a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx index 709bfdb98f7b..225f2b5eb62b 100644 --- a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx +++ b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx @@ -150,7 +150,7 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) } else nType = OTools::MapOdbcType2Jdbc(getNumColAttrib(column,SQL_DESC_CONCISE_TYPE )); - aFind = m_aColumnTypes.insert(std::map<sal_Int32,sal_Int32>::value_type(column,nType)).first; + aFind = m_aColumnTypes.emplace(column,nType).first; } |