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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/dialog/searchcharmap.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/fmundo.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/formcontroller.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 15 |
4 files changed, 10 insertions, 13 deletions
diff --git a/svx/source/dialog/searchcharmap.cxx b/svx/source/dialog/searchcharmap.cxx index ff22615f77fa..058fb5e2fddb 100644 --- a/svx/source/dialog/searchcharmap.cxx +++ b/svx/source/dialog/searchcharmap.cxx @@ -433,7 +433,7 @@ svx::SvxShowCharSetItem* SvxSearchCharSet::ImplGetItem( int _nPos ) OSL_ENSURE(m_xAccessible.is(), "Who wants to create a child of my table without a parent?"); std::shared_ptr<svx::SvxShowCharSetItem> xItem(new svx::SvxShowCharSetItem(*this, m_xAccessible->getTable(), sal::static_int_cast< sal_uInt16 >(_nPos))); - aFind = m_aItems.insert(ItemsMap::value_type(_nPos, xItem)).first; + aFind = m_aItems.emplace(_nPos, xItem).first; OUStringBuffer buf; std::unordered_map<sal_Int32,sal_UCS4>::const_iterator got = m_aItemList.find (_nPos); buf.appendUtf32( got->second ); diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index e1408f8a604d..8bef3f5c52cb 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -639,7 +639,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt) } // insert the new entry - aPropertyPos = rPropInfos.insert(PropertySetInfo::AllProperties::value_type(evt.PropertyName,aNewEntry)).first; + aPropertyPos = rPropInfos.emplace(evt.PropertyName,aNewEntry).first; DBG_ASSERT(aPropertyPos != rPropInfos.end(), "FmXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?"); } diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index fb63de35bd96..f54e6771cb16 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -4065,8 +4065,8 @@ FormController::interceptedQueryDispatch( const URL& aURL, DispatcherContainer::const_iterator aDispatcherPos = m_aFeatureDispatchers.find( nFormFeature ); if ( aDispatcherPos == m_aFeatureDispatchers.end() ) { - aDispatcherPos = m_aFeatureDispatchers.insert( - DispatcherContainer::value_type( nFormFeature, new svx::OSingleFeatureDispatcher( aURL, nFormFeature, m_xFormOperations, m_aMutex ) ) + aDispatcherPos = m_aFeatureDispatchers.emplace( + nFormFeature, new svx::OSingleFeatureDispatcher( aURL, nFormFeature, m_xFormOperations, m_aMutex ) ).first; } diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 11e6676eb484..858b97db244a 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -155,20 +155,17 @@ GalleryThemePopup::GalleryThemePopup( mpPopupMenu->SetPopupMenu(mpPopupMenu->GetItemId("background"), mpBackgroundPopup); // SID_GALLERY_ENABLE_ADDCOPY - m_aCommandInfo.insert( - CommandInfoMap::value_type( + m_aCommandInfo.emplace( SID_GALLERY_ENABLE_ADDCOPY, - CommandInfo( CMD_SID_GALLERY_ENABLE_ADDCOPY ))); + CommandInfo( CMD_SID_GALLERY_ENABLE_ADDCOPY )); // SID_GALLERY_BG_BRUSH - m_aCommandInfo.insert( - CommandInfoMap::value_type( + m_aCommandInfo.emplace( SID_GALLERY_BG_BRUSH, - CommandInfo( CMD_SID_GALLERY_BG_BRUSH ))); + CommandInfo( CMD_SID_GALLERY_BG_BRUSH )); // SID_GALLERY_FORMATS - m_aCommandInfo.insert( - CommandInfoMap::value_type( + m_aCommandInfo.emplace( SID_GALLERY_FORMATS, - CommandInfo( CMD_SID_GALLERY_FORMATS ))); + CommandInfo( CMD_SID_GALLERY_FORMATS )); } |