diff options
| author | 2021-04-06 20:06:18 +0100 | |
|---|---|---|
| committer | 2021-04-07 10:36:11 +0100 | |
| commit | 942fd2bcfd384a12c900999fe663202c87319a68 (patch) | |
| tree | c2bad1906af27afbc3c7d96c3e5ca3c27c83f090 /src/cull.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Switch simple iterator loops to use range-based for loops.
Diffstat (limited to 'src/cull.cpp')
| -rw-r--r-- | src/cull.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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<LocalUser *>::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"); |
