summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-11 11:36:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-11 13:51:29 +0200
commitdb17a874af37350b3270932175854ee674447bc1 (patch)
treefecc983fb75d3a4072cc7bd344fc824d548deb0d /extensions
parentdd8a400bbbb1b8d5592a870f2036a4df3d005a7d (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 'extensions')
-rw-r--r--extensions/source/config/ldap/ldapaccess.cxx8
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx2
2 files changed, 4 insertions, 6 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index d24f66e28c1b..0ef10fb913b0 100644
--- a/extensions/source/config/ldap/ldapaccess.cxx
+++ b/extensions/source/config/ldap/ldapaccess.cxx
@@ -203,8 +203,7 @@ void LdapConnection::initConnection()
if (values) {
const OUString aAttr( reinterpret_cast<sal_Unicode*>( attr ) );
const OUString aValues( reinterpret_cast<sal_Unicode*>( *values ) );
- data->insert(
- LdapData::value_type( aAttr, aValues ));
+ data->emplace( aAttr, aValues );
ldap_value_freeW(values);
}
attr = ldap_next_attributeW(mConnection, result.msg, ptr);
@@ -213,10 +212,9 @@ void LdapConnection::initConnection()
while (attr) {
char ** values = ldap_get_values(mConnection, result.msg, attr);
if (values) {
- data->insert(
- LdapData::value_type(
+ data->emplace(
OStringToOUString(attr, RTL_TEXTENCODING_ASCII_US),
- OStringToOUString(*values, RTL_TEXTENCODING_UTF8)));
+ OStringToOUString(*values, RTL_TEXTENCODING_UTF8));
ldap_value_free(values);
}
attr = ldap_next_attribute(mConnection, result.msg, ptr);
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index d7e4881d6b08..af24701eac77 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -590,7 +590,7 @@ namespace dbp
{
OSL_FAIL("OControlWizard::initContext: unexpected exception while gathering column information!");
}
- m_aContext.aTypes.insert(OControlWizardContext::TNameTypeMap::value_type(*pBegin,nFieldType));
+ m_aContext.aTypes.emplace(*pBegin,nFieldType);
}
}
}