From 569324feeecea939854e45bbd44495b849fcfd59 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 18 Apr 2021 04:37:51 +0100 Subject: Migrate collections from insert to emplace. --- src/modules/m_helpop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_helpop.cpp') diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index c4087e36c..fe1a1ab96 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -144,7 +144,7 @@ class ModuleHelpop // Read the help title and store the topic. const std::string title = tag->getString("title", InspIRCd::Format("*** Help for %s", key.c_str()), 1); - if (!newhelp.insert(std::make_pair(key, HelpTopic(helpmsg, title))).second) + if (!newhelp.emplace(key, HelpTopic(helpmsg, title)).second) { throw ModuleException(InspIRCd::Format(" tag with duplicate key '%s' at %s", key.c_str(), tag->source.str().c_str())); @@ -169,7 +169,7 @@ class ModuleHelpop } indexmsg.push_back(indexline); } - newhelp.insert(std::make_pair("index", HelpTopic(indexmsg, "List of help topics"))); + newhelp.emplace("index", HelpTopic(indexmsg, "List of help topics")); cmd.help.swap(newhelp); auto tag = ServerInstance->Config->ConfValue("helpmsg"); -- cgit v1.3.1-10-gc9f91