mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
Convert all foreach() to range-based for()
This commit is contained in:
parent
d668a4fe6d
commit
6b1d26d555
64 changed files with 326 additions and 292 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue