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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/appl/workwin.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/filtergrouping.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 7b8ebc4ee978..578a202f1540 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -312,7 +312,7 @@ namespace while (pToolBarResToName[nIndex].eId != ToolbarId::None) { OUString aResourceURL( OUString::createFromAscii( pToolBarResToName[nIndex].pName )); - m_aResIdToResourceURLMap.insert(ToolBarResIdToResourceURLMap::value_type(pToolBarResToName[nIndex].eId, aResourceURL)); + m_aResIdToResourceURLMap.emplace(pToolBarResToName[nIndex].eId, aResourceURL); ++nIndex; } } diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index d55171a913bf..e26ace875906 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -181,7 +181,7 @@ namespace sfx2 FilterClassList::iterator aInsertPos = m_rClassList.end(); --aInsertPos; // remember this position - m_rClassesReferrer.insert( FilterClassReferrer::value_type( _rLogicalFilterName, aInsertPos ) ); + m_rClassesReferrer.emplace( _rLogicalFilterName, aInsertPos ); } }; @@ -349,7 +349,7 @@ namespace sfx2 void operator() ( const FilterName& _rName ) { ::std::pair< FilterGroupEntryReferrer::iterator, bool > aInsertRes = - m_rEntryReferrer.insert( FilterGroupEntryReferrer::value_type( _rName, m_aClassPos ) ); + m_rEntryReferrer.emplace( _rName, m_aClassPos ); SAL_WARN_IF( !aInsertRes.second, "sfx.dialog", "already have an element for " << _rName); diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 173f14524628..f11e73b27dd7 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -156,9 +156,9 @@ sal_Int16 MapGroupIDToCommandGroup( SfxGroupId nGroupID ) sal_Int32 i = 0; while ( GroupIDCommandGroupMap[i].nGroupID != SfxGroupId::NONE ) { - s_aHashMap.insert( GroupHashMap::value_type( + s_aHashMap.emplace( GroupIDCommandGroupMap[i].nGroupID, - GroupIDCommandGroupMap[i].nCommandGroup )); + GroupIDCommandGroupMap[i].nCommandGroup ); ++i; } bGroupIDMapInitialized = true; |