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/cull.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/cull.cpp') diff --git a/src/cull.cpp b/src/cull.cpp index 9a6665a29..4c0d2a92b 100644 --- a/src/cull.cpp +++ b/src/cull.cpp @@ -69,9 +69,8 @@ void CullList::Apply() while (!SQlist.empty()) { working.swap(SQlist); - for(std::vector::iterator a = working.begin(); a != working.end(); a++) + for (const auto& u : working) { - LocalUser *u = *a; ServerInstance->SNO.WriteGlobalSno('a', "User %s SendQ exceeds connect class maximum of %lu", u->nick.c_str(), u->GetClass()->GetSendqHardMax()); ServerInstance->Users.QuitUser(u, "SendQ exceeded"); -- cgit v1.3.1-10-gc9f91