From 5fa3d8f9297f50e25a7bad6a9bde91b9024330de Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 12 Sep 2022 20:33:21 +0100 Subject: Use emplace() instead of insert(std::make_pair()). --- modules/webcpanel/pages/index.cpp | 8 ++++---- modules/webcpanel/template_fileserver.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/webcpanel') 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; } }; -- cgit