From 942fd2bcfd384a12c900999fe663202c87319a68 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 6 Apr 2021 20:06:18 +0100 Subject: Switch simple iterator loops to use range-based for loops. --- src/modules/m_exemptchanops.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/modules/m_exemptchanops.cpp') diff --git a/src/modules/m_exemptchanops.cpp b/src/modules/m_exemptchanops.cpp index b44a825fb..84776bbf5 100644 --- a/src/modules/m_exemptchanops.cpp +++ b/src/modules/m_exemptchanops.cpp @@ -131,13 +131,14 @@ class ExemptHandler : public CheckExemption::EventListener if (list) { - for (ListModeBase::ModeList::iterator i = list->begin(); i != list->end(); ++i) + for (const auto& entry : *list) { - std::string::size_type pos = (*i).mask.find(':'); + std::string::size_type pos = entry.mask.find(':'); if (pos == std::string::npos) continue; - if (!i->mask.compare(0, pos, restriction)) - minmode.assign(i->mask, pos + 1, std::string::npos); + + if (!entry.mask.compare(0, pos, restriction)) + minmode.assign(entry.mask, pos + 1, std::string::npos); } } -- cgit v1.3.1-10-gc9f91