summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/modules/xmlrpc.h2
-rw-r--r--modules/commands/cs_flags.cpp2
-rw-r--r--modules/commands/cs_set.cpp4
-rw-r--r--modules/commands/ns_set.cpp4
-rw-r--r--modules/commands/os_defcon.cpp2
-rw-r--r--modules/extra/m_ldap.cpp2
-rw-r--r--modules/extra/m_mysql.cpp2
-rw-r--r--modules/m_httpd.cpp2
-rw-r--r--modules/protocol/inspircd.cpp2
-rw-r--r--modules/pseudoclients/nickserv.cpp2
-rw-r--r--modules/webcpanel/pages/index.cpp8
-rw-r--r--modules/webcpanel/template_fileserver.h2
-rw-r--r--src/channels.cpp2
-rw-r--r--src/config.cpp2
-rw-r--r--src/modes.cpp2
-rw-r--r--src/timers.cpp2
-rw-r--r--src/xline.cpp2
17 files changed, 22 insertions, 22 deletions
diff --git a/include/modules/xmlrpc.h b/include/modules/xmlrpc.h
index 9a197f4f6..380e22ab6 100644
--- a/include/modules/xmlrpc.h
+++ b/include/modules/xmlrpc.h
@@ -21,7 +21,7 @@ class XMLRPCRequest
HTTPReply& r;
XMLRPCRequest(HTTPReply &_r) : r(_r) { }
- inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.insert(std::make_pair(dname, ddata)); }
+ inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.emplace(dname, ddata); }
inline const std::map<Anope::string, Anope::string> &get_replies() { return this->replies; }
};
diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp
index 020f42a7f..a241f6dbc 100644
--- a/modules/commands/cs_flags.cpp
+++ b/modules/commands/cs_flags.cpp
@@ -451,7 +451,7 @@ class CommandCSFlags : public Command
typedef std::multimap<char, Anope::string, ci::less> reverse_map;
reverse_map reverse;
for (std::map<Anope::string, char>::iterator it = defaultFlags.begin(), it_end = defaultFlags.end(); it != it_end; ++it)
- reverse.insert(std::make_pair(it->second, it->first));
+ reverse.emplace(it->second, it->first);
for (reverse_map::iterator it = reverse.begin(), it_end = reverse.end(); it != it_end; ++it)
{
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp
index 3081357d0..f424549b3 100644
--- a/modules/commands/cs_set.cpp
+++ b/modules/commands/cs_set.cpp
@@ -1138,9 +1138,9 @@ class CSSet : public Module
{
size_t c = modes.find(',');
if (c == Anope::string::npos)
- ci->last_modes.insert(std::make_pair(modes, ""));
+ ci->last_modes.emplace(modes, "");
else
- ci->last_modes.insert(std::make_pair(modes.substr(0, c), modes.substr(c + 1)));
+ ci->last_modes.emplace(modes.substr(0, c), modes.substr(c + 1));
}
}
} keep_modes;
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp
index 36fe49df1..b7588a495 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/commands/ns_set.cpp
@@ -1231,9 +1231,9 @@ class NSSet : public Module
{
size_t c = modes.find(',');
if (c == Anope::string::npos)
- nc->last_modes.insert(std::make_pair(modes, ""));
+ nc->last_modes.emplace(modes, "");
else
- nc->last_modes.insert(std::make_pair(modes.substr(0, c), modes.substr(c + 1)));
+ nc->last_modes.emplace(modes.substr(0, c), modes.substr(c + 1));
}
}
} keep_modes;
diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp
index 2a9dcb4e3..7471eab29 100644
--- a/modules/commands/os_defcon.cpp
+++ b/modules/commands/os_defcon.cpp
@@ -72,7 +72,7 @@ struct DefconConfig
bool SetDefConParam(const Anope::string &name, const Anope::string &buf)
{
- return DefConModesOnParams.insert(std::make_pair(name, buf)).second;
+ return DefConModesOnParams.emplace(name, buf).second;
}
void UnsetDefConParam(const Anope::string &name)
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 << ")";
}
diff --git a/modules/m_httpd.cpp b/modules/m_httpd.cpp
index 63bfe7fd4..4ce4ba945 100644
--- a/modules/m_httpd.cpp
+++ b/modules/m_httpd.cpp
@@ -318,7 +318,7 @@ class MyHTTPProvider : public HTTPProvider, public Timer
bool RegisterPage(HTTPPage *page) override
{
- return this->pages.insert(std::make_pair(page->GetURL(), page)).second;
+ return this->pages.emplace(page->GetURL(), page).second;
}
void UnregisterPage(HTTPPage *page) override
diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp
index 206cdfe1e..82e17a070 100644
--- a/modules/protocol/inspircd.cpp
+++ b/modules/protocol/inspircd.cpp
@@ -1378,7 +1378,7 @@ class IRCDMessageMetadata : IRCDMessage
Anope::string modechr, modelimit;
while (limitstream.GetToken(modechr) && limitstream.GetToken(modelimit))
{
- limits.insert(std::make_pair(modechr[0], convertTo<unsigned>(modelimit)));
+ limits.emplace(modechr[0], convertTo<unsigned>(modelimit));
}
maxlist.Set(c, limits);
}
diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp
index 7d36ba7a1..49402ee05 100644
--- a/modules/pseudoclients/nickserv.cpp
+++ b/modules/pseudoclients/nickserv.cpp
@@ -96,7 +96,7 @@ class NickServRelease : public User, public Timer
delete nit->second;
}
- NickServReleases.insert(std::make_pair(this->nick, this));
+ NickServReleases.emplace(this->nick, this);
IRCD->SendClientIntroduction(this);
}
diff --git a/modules/webcpanel/pages/index.cpp b/modules/webcpanel/pages/index.cpp
index 2eee59e26..bb986ce54 100644
--- a/modules/webcpanel/pages/index.cpp
+++ b/modules/webcpanel/pages/index.cpp
@@ -60,15 +60,15 @@ class WebpanelRequest : public IdentifyRequest
{
HTTPReply::cookie c;
- c.push_back(std::make_pair("account", na->nick));
- c.push_back(std::make_pair("Path", "/"));
+ c.emplace_back("account", na->nick);
+ c.emplace_back("Path", "/");
reply.cookies.push_back(c);
}
{
HTTPReply::cookie c;
- c.push_back(std::make_pair("id", id));
- c.push_back(std::make_pair("Path", "/"));
+ c.emplace_back("id", id);
+ c.emplace_back("Path", "/");
reply.cookies.push_back(c);
}
diff --git a/modules/webcpanel/template_fileserver.h b/modules/webcpanel/template_fileserver.h
index b78b6966f..3d2e81937 100644
--- a/modules/webcpanel/template_fileserver.h
+++ b/modules/webcpanel/template_fileserver.h
@@ -18,7 +18,7 @@ class TemplateFileServer
{
Anope::string& operator[](const Anope::string &key)
{
- return insert(std::make_pair(key, ""))->second;
+ return emplace(key, "")->second;
}
};
diff --git a/src/channels.cpp b/src/channels.cpp
index 08998de77..a0afe6d39 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -304,7 +304,7 @@ void Channel::SetModeInternal(MessageSource &setter, ChannelMode *ocm, const Ano
else if (this->HasMode(cm->name, param))
return;
- this->modes.insert(std::make_pair(cm->name, param));
+ this->modes.emplace(cm->name, param);
if (param.empty() && cm->type != MODE_REGULAR)
{
diff --git a/src/config.cpp b/src/config.cpp
index d7b90a105..0d1900268 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -831,7 +831,7 @@ void Conf::LoadConf(File &file)
}
Block *b = block_stack.empty() ? this : block_stack.top();
- block_map::iterator it = b->blocks.insert(std::make_pair(wordbuffer, Configuration::Block(wordbuffer)));
+ block_map::iterator it = b->blocks.emplace(wordbuffer, Configuration::Block(wordbuffer));
b = &it->second;
b->linenum = linenumber;
block_stack.push(b);
diff --git a/src/modes.cpp b/src/modes.cpp
index b7a9ec8bf..150e0845b 100644
--- a/src/modes.cpp
+++ b/src/modes.cpp
@@ -297,7 +297,7 @@ void StackerInfo::AddMode(Mode *mode, bool set, const Anope::string &param)
}
/* Add this mode and its param to our list */
- list->push_back(std::make_pair(mode, param));
+ list->emplace_back(mode, param);
}
static class ModePipe : public Pipe
diff --git a/src/timers.cpp b/src/timers.cpp
index abb8bfeaf..cb4b8c0f9 100644
--- a/src/timers.cpp
+++ b/src/timers.cpp
@@ -80,7 +80,7 @@ Module *Timer::GetOwner() const
void TimerManager::AddTimer(Timer *t)
{
- Timers.insert(std::make_pair(t->GetTimer(), t));
+ Timers.emplace(t->GetTimer(), t);
}
void TimerManager::DelTimer(Timer *t)
diff --git a/src/xline.cpp b/src/xline.cpp
index ba402fe59..fb98f9b24 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -288,7 +288,7 @@ const std::vector<XLine *> &XLineManager::GetList() const
void XLineManager::AddXLine(XLine *x)
{
if (!x->id.empty())
- XLinesByUID->insert(std::make_pair(x->id, x));
+ XLinesByUID->emplace(x->id, x);
this->xlines->push_back(x);
x->manager = this;
}