mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Convert all foreach() to range-based for()
This commit is contained in:
@@ -649,7 +649,8 @@ void WebApplication::sessionStart()
|
||||
|
||||
// remove outdated sessions
|
||||
const qint64 now = QDateTime::currentMSecsSinceEpoch() / 1000;
|
||||
foreach (const auto session, m_sessions) {
|
||||
const QMap<QString, WebSession *> sessionsCopy {m_sessions};
|
||||
for (const auto session : sessionsCopy) {
|
||||
if ((now - session->timestamp()) > INACTIVE_TIME)
|
||||
delete m_sessions.take(session->id());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user