diff options
Diffstat (limited to 'modules/commands/os_config.cpp')
-rw-r--r-- | modules/commands/os_config.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/commands/os_config.cpp b/modules/commands/os_config.cpp index f94491a5c..3f211d695 100644 --- a/modules/commands/os_config.cpp +++ b/modules/commands/os_config.cpp @@ -62,11 +62,11 @@ class CommandOSConfig : public Command ListFormatter lflist(source.GetAccount()); lflist.AddColumn(_("Name")).AddColumn(_("Value")); - for (Configuration::Block::item_map::const_iterator it = items.begin(), it_end = items.end(); it != it_end; ++it) + for (const auto &[name, value] : items) { ListFormatter::ListEntry entry; - entry["Name"] = it->first; - entry["Value"] = it->second; + entry["Name"] = name; + entry["Value"] = value; lflist.AddEntry(entry); } @@ -75,8 +75,8 @@ class CommandOSConfig : public Command source.Reply(_("%s settings:"), block->GetName().c_str()); - for (unsigned j = 0; j < replies.size(); ++j) - source.Reply(replies[j]); + for (const auto &reply : replies) + source.Reply(reply); source.Reply(" "); } @@ -95,10 +95,10 @@ class CommandOSConfig : public Command ListFormatter::ListEntry entry; entry["Module Name"] = block->Get<Anope::string>("name"); - for (Configuration::Block::item_map::const_iterator it = items.begin(), it_end = items.end(); it != it_end; ++it) + for (const auto &[name, value] : items) { - entry["Name"] = it->first; - entry["Value"] = it->second; + entry["Name"] = name; + entry["Value"] = value; lflist.AddEntry(entry); } } @@ -108,8 +108,8 @@ class CommandOSConfig : public Command source.Reply(_("Module settings:")); - for (unsigned j = 0; j < replies.size(); ++j) - source.Reply(replies[j]); + for (const auto &reply : replies) + source.Reply(reply); source.Reply(_("End of configuration.")); } |