aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_auditorium.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-04-06 20:06:18 +0100
committerGravatar Sadie Powell2021-04-07 10:36:11 +0100
commit942fd2bcfd384a12c900999fe663202c87319a68 (patch)
treec2bad1906af27afbc3c7d96c3e5ca3c27c83f090 /src/modules/m_auditorium.cpp
parentMerge branch 'insp3' into master. (diff)
Switch simple iterator loops to use range-based for loops.
Diffstat (limited to 'src/modules/m_auditorium.cpp')
-rw-r--r--src/modules/m_auditorium.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp
index e2466439b..cbaf5ddcc 100644
--- a/src/modules/m_auditorium.cpp
+++ b/src/modules/m_auditorium.cpp
@@ -138,11 +138,10 @@ class ModuleAuditorium
if (IsVisible(memb))
return;
- const Channel::MemberMap& users = memb->chan->GetUsers();
- for (Channel::MemberMap::const_iterator i = users.begin(); i != users.end(); ++i)
+ for (const auto& [user, _] : memb->chan->GetUsers())
{
- if (IS_LOCAL(i->first) && !CanSee(i->first, memb))
- excepts.insert(i->first);
+ if (IS_LOCAL(user) && !CanSee(user, memb))
+ excepts.insert(user);
}
}
@@ -170,11 +169,10 @@ class ModuleAuditorium
// this channel should not be considered when listing my neighbors
i = include.erase(i);
// however, that might hide me from ops that can see me...
- const Channel::MemberMap& users = memb->chan->GetUsers();
- for(Channel::MemberMap::const_iterator j = users.begin(); j != users.end(); ++j)
+ for (const auto& [user, _] : memb->chan->GetUsers())
{
- if (IS_LOCAL(j->first) && CanSee(j->first, memb))
- exception[j->first] = true;
+ if (IS_LOCAL(user) && CanSee(user, memb))
+ exception[user] = true;
}
}
}