diff options
| author | 2021-04-06 20:06:18 +0100 | |
|---|---|---|
| committer | 2021-04-07 10:36:11 +0100 | |
| commit | 942fd2bcfd384a12c900999fe663202c87319a68 (patch) | |
| tree | c2bad1906af27afbc3c7d96c3e5ca3c27c83f090 /src/modules/m_autoop.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Switch simple iterator loops to use range-based for loops.
Diffstat (limited to 'src/modules/m_autoop.cpp')
| -rw-r--r-- | src/modules/m_autoop.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp index d69933df9..fddbd52b9 100644 --- a/src/modules/m_autoop.cpp +++ b/src/modules/m_autoop.cpp @@ -103,14 +103,15 @@ class ModuleAutoOp : public Module if (list) { Modes::ChangeList changelist; - for (ListModeBase::ModeList::iterator it = list->begin(); it != list->end(); it++) + for (const auto& entry : *list) { - std::string::size_type colon = it->mask.find(':'); + std::string::size_type colon = entry.mask.find(':'); if (colon == std::string::npos) continue; - if (memb->chan->CheckBan(memb->user, it->mask.substr(colon+1))) + + if (memb->chan->CheckBan(memb->user, entry.mask.substr(colon + 1))) { - PrefixMode* given = mh.FindMode(it->mask.substr(0, colon)); + PrefixMode* given = mh.FindMode(entry.mask.substr(0, colon)); if (given) changelist.push_add(given, memb->user->nick); } |
