mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 09:13:08 -07:00
Replace QMap with QHash when sensible
This commit is contained in:
parent
44e4a5b13a
commit
375de4f8a6
4 changed files with 3 additions and 6 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue