replace for_each with range loops

No advantage over the latter, which is simpler.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2025-06-18 17:50:05 -07:00
committed by Jari Sundell
parent 8b663dd169
commit 84c0d516ef
10 changed files with 43 additions and 43 deletions
+4 -2
View File
@@ -142,9 +142,11 @@ Manager::cleanup() {
void
Manager::shutdown(bool force) {
if (!force)
std::for_each(m_download_list->begin(), m_download_list->end(), [this](Download* d) { m_download_list->pause_default(d); });
for (auto d : *m_download_list)
m_download_list->pause_default(d);
else
std::for_each(m_download_list->begin(), m_download_list->end(), [this](Download* d) { m_download_list->close_quick(d); });
for (auto d : *m_download_list)
m_download_list->close_quick(d);
}
void