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 /comphelper/source | |
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 'comphelper/source')
4 files changed, 5 insertions, 5 deletions
diff --git a/comphelper/source/container/NamedPropertyValuesContainer.cxx b/comphelper/source/container/NamedPropertyValuesContainer.cxx index 7e72ccce808e..771c9ac5a262 100644 --- a/comphelper/source/container/NamedPropertyValuesContainer.cxx +++ b/comphelper/source/container/NamedPropertyValuesContainer.cxx @@ -76,7 +76,7 @@ void SAL_CALL NamedPropertyValuesContainer::insertByName( const OUString& aName, if( !(aElement >>= aProps ) ) throw lang::IllegalArgumentException(); - maProperties.insert( NamedPropertyValues::value_type(aName ,aProps) ); + maProperties.emplace( aName, aProps ); } void SAL_CALL NamedPropertyValuesContainer::removeByName( const OUString& Name ) diff --git a/comphelper/source/container/namecontainer.cxx b/comphelper/source/container/namecontainer.cxx index 23b87df8b94c..3e7e8c61ea5f 100644 --- a/comphelper/source/container/namecontainer.cxx +++ b/comphelper/source/container/namecontainer.cxx @@ -82,7 +82,7 @@ void SAL_CALL NameContainer::insertByName( const OUString& aName, const Any& aEl if( aElement.getValueType() != maType ) throw IllegalArgumentException(); - maProperties.insert( SvGenericNameContainerMapImpl::value_type(aName,aElement)); + maProperties.emplace(aName,aElement); } void SAL_CALL NameContainer::removeByName( const OUString& Name ) diff --git a/comphelper/source/misc/accessibleeventnotifier.cxx b/comphelper/source/misc/accessibleeventnotifier.cxx index 702d03bab8fd..884109279251 100644 --- a/comphelper/source/misc/accessibleeventnotifier.cxx +++ b/comphelper/source/misc/accessibleeventnotifier.cxx @@ -157,7 +157,7 @@ AccessibleEventNotifier::TClientId AccessibleEventNotifier::registerClient() // completely nonsense, and potentially slowing down the Office me thinks... // add the client - Clients::get().insert( ClientMap::value_type( nNewClientId, pNewListeners ) ); + Clients::get().emplace( nNewClientId, pNewListeners ); // outta here return nNewClientId; diff --git a/comphelper/source/property/propertybag.cxx b/comphelper/source/property/propertybag.cxx index b3be3ddbf5ac..027301a4d318 100644 --- a/comphelper/source/property/propertybag.cxx +++ b/comphelper/source/property/propertybag.cxx @@ -123,7 +123,7 @@ namespace comphelper registerPropertyNoMember( _rName, _nHandle, _nAttributes | PropertyAttribute::MAYBEVOID, _rType, css::uno::Any() ); // remember the default - m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, Any() ) ); + m_pImpl->aDefaults.emplace( _nHandle, Any() ); } @@ -146,7 +146,7 @@ namespace comphelper _rInitialValue ); // remember the default - m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, _rInitialValue ) ); + m_pImpl->aDefaults.emplace( _nHandle, _rInitialValue ); } |