From 441bd151da733d32e194de6e4a1744ae273b83ee Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 31 Oct 2020 20:03:19 +0000 Subject: Add stdalgo::iterator_range and switch config tag reading to use it. This allows us to use range-based for loops which were not possible with the previous config tag system. --- src/listmode.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/listmode.cpp') diff --git a/src/listmode.cpp b/src/listmode.cpp index 4ce7647e9..551f061c0 100644 --- a/src/listmode.cpp +++ b/src/listmode.cpp @@ -65,13 +65,11 @@ void ListModeBase::RemoveMode(Channel* channel, Modes::ChangeList& changelist) void ListModeBase::DoRehash() { - ConfigTagList tags = ServerInstance->Config->ConfTags("maxlist"); limitlist newlimits; bool seen_default = false; - for (ConfigIter i = tags.first; i != tags.second; i++) - { - ConfigTag* c = i->second; + for (auto& [_, c] : ServerInstance->Config->ConfTags("maxlist")) + { const std::string mname = c->getString("mode"); if (!mname.empty() && !stdalgo::string::equalsci(mname, name) && !(mname.length() == 1 && GetModeChar() == mname[0])) continue; -- cgit v1.3.1-10-gc9f91