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 /forms/source/richtext/richtextimplcontrol.cxx | |
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 'forms/source/richtext/richtextimplcontrol.cxx')
-rw-r--r-- | forms/source/richtext/richtextimplcontrol.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index d9ba2469e1e4..dad5042b2846 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -191,12 +191,12 @@ namespace frm return; SAL_WARN_IF( _nAttributeId != aHandler->getAttributeId(), "forms.richtext", "RichTextControlImpl::enableAttributeNotification: suspicious handler!" ); - aHandlerPos = m_aAttributeHandlers.insert( AttributeHandlerPool::value_type( _nAttributeId , aHandler ) ).first; + aHandlerPos = m_aAttributeHandlers.emplace( _nAttributeId , aHandler ).first; } // remember the listener if ( _pListener ) - m_aAttributeListeners.insert( AttributeListenerPool::value_type( _nAttributeId, _pListener ) ); + m_aAttributeListeners.emplace( _nAttributeId, _pListener ); // update (and broadcast) the state of this attribute updateAttribute( _nAttributeId ); @@ -240,7 +240,7 @@ namespace frm StateCache::iterator aCachePos = m_aLastKnownStates.find( _nAttribute ); if ( aCachePos == m_aLastKnownStates.end() ) { // nothing known about this attribute, yet - m_aLastKnownStates.insert( StateCache::value_type( _nAttribute, _rState ) ); + m_aLastKnownStates.emplace( _nAttribute, _rState ); } else { |