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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/dialog/charmap.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/fmtextcontrolshell.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/fmundo.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbunosearchcontrollers.cxx | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 4904de3ab689..d997ab7e90ae 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -730,7 +730,7 @@ svx::SvxShowCharSetItem* SvxShowCharSet::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; buf.appendUtf32( mxFontCharMap->GetCharFromIndex( _nPos ) ); aFind->second->maText = buf.makeStringAndClear(); diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 73f73af16fa6..23490582a59a 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -1247,7 +1247,7 @@ namespace svx { FmTextControlFeature* pDispatcher = implGetFeatureDispatcher( xProvider, pApplication, *pSlots ); if ( pDispatcher ) - _rDispatchers.insert( ControlFeatures::value_type( *pSlots, ControlFeature( pDispatcher ) ) ); + _rDispatchers.emplace( *pSlots, ControlFeature( pDispatcher ) ); ++pSlots; } diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 652faa322f9a..e1408f8a604d 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -597,7 +597,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt) DBG_UNHANDLED_EXCEPTION(); } } - aSetPos = pCache->insert(PropertySetInfoCache::value_type(xSet,aNewEntry)).first; + aSetPos = pCache->emplace(xSet,aNewEntry).first; DBG_ASSERT(aSetPos != pCache->end(), "FmXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?"); } else diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 30b3ef99621b..98f27571585e 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -360,7 +360,7 @@ void SearchToolbarControllersManager::registryController( const css::uno::Refere SearchToolbarControllersVec lControllers(1); lControllers[0].Name = sCommandURL; lControllers[0].Value <<= xStatusListener; - aSearchToolbarControllersMap.insert(SearchToolbarControllersMap::value_type(xFrame, lControllers)); + aSearchToolbarControllersMap.emplace(xFrame, lControllers); } else { |