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 /configmgr | |
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 'configmgr')
-rw-r--r-- | configmgr/source/access.cxx | 5 | ||||
-rw-r--r-- | configmgr/source/components.cxx | 3 | ||||
-rw-r--r-- | configmgr/source/data.cxx | 5 | ||||
-rw-r--r-- | configmgr/source/modifications.cxx | 3 |
4 files changed, 6 insertions, 10 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 13a52885e6c2..0f062b30bdf7 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -154,10 +154,9 @@ void Access::markChildAsModified(rtl::Reference< ChildAccess > const & child) { break; } assert(dynamic_cast< ChildAccess * >(p.get()) != nullptr); - parent->modifiedChildren_.insert( - ModifiedChildren::value_type( + parent->modifiedChildren_.emplace( p->getNameInternal(), - ModifiedChild(static_cast< ChildAccess * >(p.get()), false))); + ModifiedChild(static_cast< ChildAccess * >(p.get()), false)); p = parent; } } diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index 39783056aa2e..af4a2396e285 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -440,8 +440,7 @@ css::beans::Optional< css::uno::Any > Components::getExternalValue( if (service.is()) { propset.set( service, css::uno::UNO_QUERY_THROW); } - j = externalServices_.insert( - ExternalServices::value_type(name, propset)).first; + j = externalServices_.emplace(name, propset).first; } css::beans::Optional< css::uno::Any > value; if (j->second.is()) { diff --git a/configmgr/source/data.cxx b/configmgr/source/data.cxx index 70ce467b8805..a24359fdb664 100644 --- a/configmgr/source/data.cxx +++ b/configmgr/source/data.cxx @@ -302,9 +302,8 @@ Additions * Data::addExtensionXcuAdditions( { rtl::Reference< ExtensionXcu > item(new ExtensionXcu); ExtensionXcuAdditions::iterator i( - extensionXcuAdditions_.insert( - ExtensionXcuAdditions::value_type( - url, rtl::Reference< ExtensionXcu >())).first); + extensionXcuAdditions_.emplace( + url, rtl::Reference< ExtensionXcu >()).first); if (i->second.is()) { throw css::uno::RuntimeException( "already added extension xcu " + url); diff --git a/configmgr/source/modifications.cxx b/configmgr/source/modifications.cxx index 630de8fbc8a6..f385fc3215bc 100644 --- a/configmgr/source/modifications.cxx +++ b/configmgr/source/modifications.cxx @@ -40,8 +40,7 @@ void Modifications::add(std::vector<OUString> const & path) { if (wasPresent && p->children.empty()) { return; } - j = p->children.insert(Node::Children::value_type(*i, Node())). - first; + j = p->children.emplace(*i, Node()).first; wasPresent = false; } else { wasPresent = true; |