diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-11 11:36:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-11 13:51:29 +0200 |
commit | db17a874af37350b3270932175854ee674447bc1 (patch) | |
tree | fecc983fb75d3a4072cc7bd344fc824d548deb0d /sfx2 | |
parent | dd8a400bbbb1b8d5592a870f2036a4df3d005a7d (diff) |
convert std::map::insert to std::map::emplace II
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331
Reviewed-on: https://gerrit.libreoffice.org/41019
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/newhelp.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/sidebar/ResourceManager.cxx | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index b9d1ff0d312d..01a5f47d6450 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -636,7 +636,7 @@ void IndexTabPage_Impl::InitializeIndex() if ( aIndex != aTempString ) { aIndex = aTempString; - it = aInfo.insert(sfx2::KeywordInfo::value_type(aTempString, 0)).first; + it = aInfo.emplace(aTempString, 0).first; if ( (tmp = it->second++) != 0) m_pIndexCB->InsertEntry(aTempString + OUString(append, tmp)); else @@ -646,7 +646,7 @@ void IndexTabPage_Impl::InitializeIndex() aIndex.clear(); // Assume the token is trimmed - it = aInfo.insert(sfx2::KeywordInfo::value_type(aKeywordPair, 0)).first; + it = aInfo.emplace(aKeywordPair, 0).first; if ((tmp = it->second++) != 0) nPos = m_pIndexCB->InsertEntry(aKeywordPair + OUString(append, tmp)); else @@ -678,7 +678,7 @@ void IndexTabPage_Impl::InitializeIndex() .append( aTitleList[j] ); aTempString = aData.makeStringAndClear(); - it = aInfo.insert(sfx2::KeywordInfo::value_type(aTempString, 0)).first; + it = aInfo.emplace(aTempString, 0).first; if ( (tmp = it->second++) != 0 ) nPos = m_pIndexCB->InsertEntry(aTempString + OUString(append, tmp)); else diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index a75aa42c86b6..1f8fb2863d4f 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -190,9 +190,7 @@ const ResourceManager::DeckContextDescriptorContainer& ResourceManager::GetMatch && rDeckDescriptor.mbIsEnabled; - aOrderedIds.insert(::std::multimap<sal_Int32,DeckContextDescriptor>::value_type( - rDeckDescriptor.mnOrderIndex, - aDeckContextDescriptor)); + aOrderedIds.emplace(rDeckDescriptor.mnOrderIndex, aDeckContextDescriptor); } std::multimap<sal_Int32,DeckContextDescriptor>::const_iterator iId; @@ -233,9 +231,7 @@ const ResourceManager::PanelContextDescriptorContainer& ResourceManager::GetMatc aPanelContextDescriptor.msMenuCommand = pEntry->msMenuCommand; aPanelContextDescriptor.mbIsInitiallyVisible = pEntry->mbIsInitiallyVisible; aPanelContextDescriptor.mbShowForReadOnlyDocuments = rPanelDescriptor.mbShowForReadOnlyDocuments; - aOrderedIds.insert(std::multimap<sal_Int32, PanelContextDescriptor>::value_type( - rPanelDescriptor.mnOrderIndex, - aPanelContextDescriptor)); + aOrderedIds.emplace(rPanelDescriptor.mnOrderIndex, aPanelContextDescriptor); } std::multimap<sal_Int32,PanelContextDescriptor>::const_iterator iId; |