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/modules/m_permchannels.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/modules/m_permchannels.cpp') diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 8353a5b00..383b2ad07 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -198,10 +198,8 @@ public: * Process config-defined list of permanent channels. * -- w00t */ - ConfigTagList permchannels = ServerInstance->Config->ConfTags("permchannels"); - for (ConfigIter i = permchannels.first; i != permchannels.second; ++i) + for (auto& [_, tag] : ServerInstance->Config->ConfTags("permchannels")) { - ConfigTag* tag = i->second; std::string channel = tag->getString("channel"); std::string modes = tag->getString("modes"); -- cgit v1.3.1-10-gc9f91