mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
Replace QMap with QHash when sensible
This commit is contained in:
@@ -537,7 +537,7 @@ void WebApplication::sessionStart()
|
||||
|
||||
// remove outdated sessions
|
||||
const qint64 now = QDateTime::currentMSecsSinceEpoch() / 1000;
|
||||
const QMap<QString, WebSession *> sessionsCopy {m_sessions};
|
||||
const QHash<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