summaryrefslogtreecommitdiff
path: root/modules/webcpanel
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/webcpanel
parent1a2da821064f8d869b999fb8e32ffeddfc82967b (diff)
Use emplace() instead of insert(std::make_pair()).
Diffstat (limited to 'modules/webcpanel')
-rw-r--r--modules/webcpanel/pages/index.cpp8
-rw-r--r--modules/webcpanel/template_fileserver.h2
2 files changed, 5 insertions, 5 deletions
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;
}
};