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

@@ -299,7 +299,7 @@ namespace
// TorrentImpl
TorrentImpl::TorrentImpl(SessionImpl *session, const lt::torrent_handle &nativeHandle, const LoadTorrentParams &params)
TorrentImpl::TorrentImpl(SessionImpl *session, const lt::torrent_handle &nativeHandle, LoadTorrentParams params)
: Torrent(session)
, m_session(session)
, m_nativeHandle(nativeHandle)
@@ -324,7 +324,7 @@ TorrentImpl::TorrentImpl(SessionImpl *session, const lt::torrent_handle &nativeH
, m_useAutoTMM(params.useAutoTMM)
, m_isStopped(params.stopped)
, m_sslParams(params.sslParameters)
, m_ltAddTorrentParams(params.ltAddTorrentParams)
, m_ltAddTorrentParams(std::move(params.ltAddTorrentParams))
, m_downloadLimit(cleanLimitValue(m_ltAddTorrentParams.download_limit))
, m_uploadLimit(cleanLimitValue(m_ltAddTorrentParams.upload_limit))
{