diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-10 16:43:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-11 12:38:32 +0200 |
commit | d347c2403605c5aa3ddd98fb605366914acab79f (patch) | |
tree | e39624030741234c514bccd858e69d6318dfba68 /ucb/source | |
parent | f0e68d4feaaa43f7450432ad1ebd92c2b572400f (diff) |
convert std::map::insert to std::map::emplace
which is considerably less verbose
Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b
Reviewed-on: https://gerrit.libreoffice.org/40978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source')
-rw-r--r-- | ucb/source/ucp/file/filtask.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVSessionFactory.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index c082cba44703..b9bbed77bb7a 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -533,7 +533,7 @@ TaskManager::registerNotifier( const OUString& aUnqPath, Notifier* pNotifier ) osl::MutexGuard aGuard( m_aMutex ); ContentMap::iterator it = - m_aContent.insert( ContentMap::value_type( aUnqPath,UnqPathData() ) ).first; + m_aContent.emplace( aUnqPath,UnqPathData() ).first; if( ! it->second.notifier ) it->second.notifier = new NotifierList; @@ -598,7 +598,7 @@ TaskManager::associate( const OUString& aUnqPath, { osl::MutexGuard aGuard( m_aMutex ); - ContentMap::iterator it = m_aContent.insert( ContentMap::value_type( aUnqPath,UnqPathData() ) ).first; + ContentMap::iterator it = m_aContent.emplace( aUnqPath,UnqPathData() ).first; // Load the XPersistentPropertySetInfo and create it, if it does not exist load( it,true ); @@ -628,7 +628,7 @@ TaskManager::deassociate( const OUString& aUnqPath, osl::MutexGuard aGuard( m_aMutex ); - ContentMap::iterator it = m_aContent.insert( ContentMap::value_type( aUnqPath,UnqPathData() ) ).first; + ContentMap::iterator it = m_aContent.emplace( aUnqPath,UnqPathData() ).first; load( it,false ); @@ -1982,7 +1982,7 @@ void SAL_CALL TaskManager::insertDefaultProperties( const OUString& aUnqPath ) osl::MutexGuard aGuard( m_aMutex ); ContentMap::iterator it = - m_aContent.insert( ContentMap::value_type( aUnqPath,UnqPathData() ) ).first; + m_aContent.emplace( aUnqPath,UnqPathData() ).first; load( it,false ); diff --git a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx b/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx index 1966eee522d2..434c924d5932 100644 --- a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx +++ b/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx @@ -70,7 +70,7 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession( std::unique_ptr< DAVSession > xElement( new NeonSession( this, inUri, rFlags, *m_xProxyDecider.get() ) ); - aIt = m_aMap.insert( Map::value_type( inUri, xElement.get() ) ).first; + aIt = m_aMap.emplace( inUri, xElement.get() ).first; aIt->second->m_aContainerIt = aIt; xElement.release(); return aIt->second; diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.cxx b/ucb/source/ucp/webdav/DAVSessionFactory.cxx index dcf293541acd..0809252bb5f2 100644 --- a/ucb/source/ucp/webdav/DAVSessionFactory.cxx +++ b/ucb/source/ucp/webdav/DAVSessionFactory.cxx @@ -57,7 +57,7 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession( std::unique_ptr< DAVSession > xElement( new SerfSession( this, inUri, *m_xProxyDecider.get() ) ); - aIt = m_aMap.insert( Map::value_type( inUri, xElement.get() ) ).first; + aIt = m_aMap.emplace( inUri, xElement.get() ) ).first; aIt->second->m_aContainerIt = aIt; xElement.release(); return aIt->second; |