mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Simplify captured variable type
By capturing the specific data instead of torrent handle the lambda can become non-mutable. PR #22102.
This commit is contained in:
parent
6fe02895a8
commit
22e156e0af
1 changed files with 3 additions and 3 deletions
|
@ -6328,7 +6328,7 @@ void SessionImpl::loadStatistics()
|
||||||
|
|
||||||
void SessionImpl::updateTrackerEntryStatuses(lt::torrent_handle torrentHandle)
|
void SessionImpl::updateTrackerEntryStatuses(lt::torrent_handle torrentHandle)
|
||||||
{
|
{
|
||||||
invokeAsync([this, torrentHandle = std::move(torrentHandle)]() mutable
|
invokeAsync([this, torrentHandle = std::move(torrentHandle)]
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -6338,9 +6338,9 @@ void SessionImpl::updateTrackerEntryStatuses(lt::torrent_handle torrentHandle)
|
||||||
QHash<std::string, QHash<lt::tcp::endpoint, QMap<int, int>>> updatedTrackers = m_updatedTrackerStatuses.take(torrentHandle);
|
QHash<std::string, QHash<lt::tcp::endpoint, QMap<int, int>>> updatedTrackers = m_updatedTrackerStatuses.take(torrentHandle);
|
||||||
updatedTrackerStatusesLocker.unlock();
|
updatedTrackerStatusesLocker.unlock();
|
||||||
|
|
||||||
invoke([this, torrentHandle, nativeTrackers = std::move(nativeTrackers), updatedTrackers = std::move(updatedTrackers)]
|
invoke([this, infoHash = torrentHandle.info_hash(), nativeTrackers = std::move(nativeTrackers), updatedTrackers = std::move(updatedTrackers)]
|
||||||
{
|
{
|
||||||
TorrentImpl *torrent = m_torrents.value(torrentHandle.info_hash());
|
TorrentImpl *torrent = m_torrents.value(infoHash);
|
||||||
if (!torrent || torrent->isStopped())
|
if (!torrent || torrent->isStopped())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue