summaryrefslogtreecommitdiff
path: root/modules/extra
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2022-09-12 20:33:21 +0100
committerSadie Powell <sadie@witchery.services>2022-12-09 16:50:29 +0000
commit5fa3d8f9297f50e25a7bad6a9bde91b9024330de (patch)
tree26cd885ac78b345361471fa55a7d0801449ede3e /modules/extra
parent1a2da821064f8d869b999fb8e32ffeddfc82967b (diff)
Use emplace() instead of insert(std::make_pair()).
Diffstat (limited to 'modules/extra')
-rw-r--r--modules/extra/m_ldap.cpp2
-rw-r--r--modules/extra/m_mysql.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp
index b450df751..498477e3c 100644
--- a/modules/extra/m_ldap.cpp
+++ b/modules/extra/m_ldap.cpp
@@ -498,7 +498,7 @@ class ModuleLDAP : public Module, public Pipe
{
LDAPService *ss = new LDAPService(this, connname, server, admin_binddn, admin_password);
ss->Start();
- this->LDAPServices.insert(std::make_pair(connname, ss));
+ this->LDAPServices.emplace(connname, ss);
Log(LOG_NORMAL, "ldap") << "LDAP: Successfully initialized server " << connname << " (" << server << ")";
}
diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp
index 136f1d086..b9a58b145 100644
--- a/modules/extra/m_mysql.cpp
+++ b/modules/extra/m_mysql.cpp
@@ -240,7 +240,7 @@ class ModuleSQL : public Module, public Pipe
try
{
MySQLService *ss = new MySQLService(this, connname, database, server, user, password, port);
- this->MySQLServices.insert(std::make_pair(connname, ss));
+ this->MySQLServices.emplace(connname, ss);
Log(LOG_NORMAL, "mysql") << "MySQL: Successfully connected to server " << connname << " (" << server << ")";
}