aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_helpop.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-04-18 04:37:51 +0100
committerGravatar Sadie Powell2021-04-18 04:58:28 +0100
commit569324feeecea939854e45bbd44495b849fcfd59 (patch)
tree38008340f746112ab17ebb8368f090aeac10aabd /src/modules/m_helpop.cpp
parentMake the reason parameter to PartUser const. (diff)
Migrate collections from insert to emplace.
Diffstat (limited to 'src/modules/m_helpop.cpp')
-rw-r--r--src/modules/m_helpop.cpp4
1 files changed, 2 insertions, 2 deletions
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("<helpop> 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");