Avoid copying resume data when loading torrents

PR #22899.
This commit is contained in:
Vladimir Golovnev
2025-06-23 12:20:01 +03:00
committed by GitHub
parent f6ee6b92a4
commit 71af105a89
6 changed files with 21 additions and 25 deletions

View File

@@ -45,7 +45,6 @@
#include <QMap>
#include <QMutex>
#include <QPointer>
#include <QQueue>
#include <QSet>
#include <QThreadPool>
@@ -618,7 +617,7 @@ namespace BitTorrent
void handleTorrentCheckedAlert(const lt::torrent_checked_alert *alert);
void handleTorrentFinishedAlert(const lt::torrent_finished_alert *alert);
TorrentImpl *createTorrent(const lt::torrent_handle &nativeHandle, const LoadTorrentParams &params);
TorrentImpl *createTorrent(const lt::torrent_handle &nativeHandle, LoadTorrentParams params);
TorrentImpl *getTorrent(const lt::torrent_handle &nativeHandle) const;
void saveResumeData();
@@ -827,7 +826,7 @@ namespace BitTorrent
TorrentContentRemover *m_torrentContentRemover = nullptr;
using AddTorrentAlertHandler = std::function<void (const lt::add_torrent_alert *alert)>;
QQueue<AddTorrentAlertHandler> m_addTorrentAlertHandlers;
QList<AddTorrentAlertHandler> m_addTorrentAlertHandlers;
QHash<TorrentID, lt::torrent_handle> m_downloadedMetadata;