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_delaymsg.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/modules/m_delaymsg.cpp') diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index 83cdc1603..d05235af5 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -85,12 +85,8 @@ ModeAction DelayMsgMode::OnSet(User* source, Channel* chan, std::string& paramet void DelayMsgMode::OnUnset(User* source, Channel* chan) { - /* - * Clean up metadata - */ - const Channel::MemberMap& users = chan->GetUsers(); - for (Channel::MemberMap::const_iterator n = users.begin(); n != users.end(); ++n) - jointime.Set(n->second, 0); + for (const auto& [_, memb] : chan->GetUsers()) + jointime.Unset(memb); } void ModuleDelayMsg::OnUserJoin(Membership* memb, bool sync, bool created, CUList&) -- cgit v1.3.1-10-gc9f91