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 /extensions/source/propctrlr/eventhandler.cxx | |
parent | python3: upgrade to release 3.5.4 (diff) | |
download | core-d347c2403605c5aa3ddd98fb605366914acab79f.tar.gz core-d347c2403605c5aa3ddd98fb605366914acab79f.zip |
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 'extensions/source/propctrlr/eventhandler.cxx')
-rw-r--r-- | extensions/source/propctrlr/eventhandler.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index 9b690dbd135c..fe01b84ba6aa 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -156,9 +156,9 @@ namespace pcr namespace { #define DESCRIBE_EVENT( asciinamespace, asciilistener, asciimethod, id_postfix ) \ - s_aKnownEvents.insert( EventMap::value_type( \ + s_aKnownEvents.emplace( \ asciimethod, \ - EventDescription( ++nEventId, asciinamespace, asciilistener, asciimethod, RID_STR_EVT_##id_postfix, HID_EVT_##id_postfix, UID_BRWEVT_##id_postfix ) ) ) + EventDescription( ++nEventId, asciinamespace, asciilistener, asciimethod, RID_STR_EVT_##id_postfix, HID_EVT_##id_postfix, UID_BRWEVT_##id_postfix ) ) bool lcl_getEventDescriptionForMethod( const OUString& _rMethodName, EventDescription& _out_rDescription ) { @@ -358,7 +358,7 @@ namespace pcr void EventHolder::addEvent( EventId _nId, const OUString& _rEventName, const ScriptEventDescriptor& _rScriptEvent ) { std::pair< EventMap::iterator, bool > insertionResult = - m_aEventNameAccess.insert( EventMap::value_type( _rEventName, _rScriptEvent ) ); + m_aEventNameAccess.emplace( _rEventName, _rScriptEvent ); OSL_ENSURE( insertionResult.second, "EventHolder::addEvent: there already was a MacroURL for this event!" ); m_aEventIndexAccess[ _nId ] = insertionResult.first; } @@ -730,8 +730,8 @@ namespace pcr if ( !impl_filterMethod_nothrow( aEvent ) ) continue; - m_aEvents.insert( EventMap::value_type( - lcl_getEventPropertyName( sListenerClassName, *pMethods ), aEvent ) ); + m_aEvents.emplace( + lcl_getEventPropertyName( sListenerClassName, *pMethods ), aEvent ); } } |