From db17a874af37350b3270932175854ee674447bc1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 11 Aug 2017 11:36:47 +0200 Subject: convert std::map::insert to std::map::emplace II Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins Reviewed-by: Noel Grandin --- ucb/source/ucp/file/filtask.cxx | 4 ++-- ucb/source/ucp/tdoc/tdoc_storage.cxx | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'ucb') diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index b9bbed77bb7a..23985897f11d 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -2814,8 +2814,8 @@ TaskManager::getContentExchangedEventListeners( const OUString& aOldPrefix, TaskManager::ContentMap::iterator itold = m_aContent.find( aOldName ); if( itold != m_aContent.end() ) { - TaskManager::ContentMap::iterator itnew = m_aContent.insert( - ContentMap::value_type( aNewName,UnqPathData() ) ).first; + TaskManager::ContentMap::iterator itnew = m_aContent.emplace( + aNewName,UnqPathData() ).first; // copy Ownership also delete itnew->second.properties; diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx index 2ffe2711e8b3..92db744e22bf 100644 --- a/ucb/source/ucp/tdoc/tdoc_storage.cxx +++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx @@ -172,10 +172,9 @@ StorageElementFactory::createStorage( const OUString & rUri, rtl::Reference< Storage > xElement( new Storage( m_xContext, this, aUriKey, xParentStorage, xStorage ) ); - aIt = m_aMap.insert( - StorageMap::value_type( + aIt = m_aMap.emplace( std::pair< OUString, bool >( aUriKey, bWritable ), - xElement.get() ) ).first; + xElement.get() ).first; aIt->second->m_aContainerIt = aIt; return aIt->second; -- cgit