summaryrefslogtreecommitdiff
path: root/modules/commands/cs_set_misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_set_misc.cpp')
-rw-r--r--modules/commands/cs_set_misc.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/modules/commands/cs_set_misc.cpp b/modules/commands/cs_set_misc.cpp
index 9c75f72e2..86233c97a 100644
--- a/modules/commands/cs_set_misc.cpp
+++ b/modules/commands/cs_set_misc.cpp
@@ -42,7 +42,7 @@ struct CSMiscData : MiscData, Serializable
data = d;
}
- void Serialize(Serialize::Data &sdata) const anope_override
+ void Serialize(Serialize::Data &sdata) const override
{
sdata["ci"] << this->object;
sdata["name"] << this->name;
@@ -96,7 +96,7 @@ class CommandCSSetMisc : public Command
this->SetSyntax(_("\037channel\037 [\037parameters\037]"));
}
- void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
+ void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
{
if (Anope::ReadOnly)
{
@@ -143,7 +143,7 @@ class CommandCSSetMisc : public Command
}
}
- void OnServHelp(CommandSource &source) anope_override
+ void OnServHelp(CommandSource &source) override
{
if (descriptions.count(source.command))
{
@@ -152,7 +152,7 @@ class CommandCSSetMisc : public Command
}
}
- bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
+ bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
{
if (descriptions.count(source.command))
{
@@ -176,13 +176,13 @@ class CSSetMisc : public Module
me = this;
}
- ~CSSetMisc()
+ ~CSSetMisc() override
{
- for (Anope::map<ExtensibleItem<CSMiscData> *>::iterator it = items.begin(); it != items.end(); ++it)
- delete it->second;
+ for (const auto &[_, item] : items)
+ delete item;
}
- void OnReload(Configuration::Conf *conf) anope_override
+ void OnReload(Configuration::Conf *conf) override
{
descriptions.clear();
@@ -203,11 +203,10 @@ class CSSetMisc : public Module
}
}
- void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool) anope_override
+ void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool) override
{
- for (Anope::map<ExtensibleItem<CSMiscData> *>::iterator it = items.begin(); it != items.end(); ++it)
+ for (const auto &[_, e] : items)
{
- ExtensibleItem<CSMiscData> *e = it->second;
MiscData *data = e->Get(ci);
if (data != NULL)