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 /framework/source/uiconfiguration/imagemanagerimpl.cxx | |
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 'framework/source/uiconfiguration/imagemanagerimpl.cxx')
-rw-r--r-- | framework/source/uiconfiguration/imagemanagerimpl.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index fccf5977c8d0..030377316e31 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -670,12 +670,12 @@ Sequence< OUString > ImageManagerImpl::getAllImageNames( ::sal_Int16 nImageType const std::vector< OUString >& rGlobalImageNameVector = rGlobalImageList->getImageCommandNames(); const sal_uInt32 nGlobalCount = rGlobalImageNameVector.size(); for ( i = 0; i < nGlobalCount; i++ ) - aImageCmdNameMap.insert( ImageNameMap::value_type( rGlobalImageNameVector[i], true )); + aImageCmdNameMap.emplace( rGlobalImageNameVector[i], true ); const std::vector< OUString >& rModuleImageNameVector = implts_getDefaultImageList()->getImageCommandNames(); const sal_uInt32 nModuleCount = rModuleImageNameVector.size(); for ( i = 0; i < nModuleCount; i++ ) - aImageCmdNameMap.insert( ImageNameMap::value_type( rModuleImageNameVector[i], true )); + aImageCmdNameMap.emplace( rModuleImageNameVector[i], true ); } ImageList* pImageList = implts_getUserImageList(nIndex); @@ -683,7 +683,7 @@ Sequence< OUString > ImageManagerImpl::getAllImageNames( ::sal_Int16 nImageType pImageList->GetImageNames( rUserImageNames ); const sal_uInt32 nUserCount = rUserImageNames.size(); for ( i = 0; i < nUserCount; i++ ) - aImageCmdNameMap.insert( ImageNameMap::value_type( rUserImageNames[i], true )); + aImageCmdNameMap.emplace( rUserImageNames[i], true ); return comphelper::mapKeysToSequence( aImageCmdNameMap ); } @@ -986,7 +986,7 @@ void ImageManagerImpl::reload() sal_uInt32 j( 0 ); const sal_uInt32 nOldCount = aOldUserCmdImageVector.size(); for ( j = 0; j < nOldCount; j++ ) - aOldUserCmdImageSet.insert( CommandMap::value_type( aOldUserCmdImageVector[j], false )); + aOldUserCmdImageSet.emplace( aOldUserCmdImageVector[j], false ); // Attention: This can make the old image list pointer invalid! implts_loadUserImages( i, m_xUserImageStorage, m_xUserBitmapsStorage ); |