From 07da484489d64c987496b95e71ccf7c2520cede5 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 1 Jan 2025 13:39:02 +0800 Subject: [PATCH] Revise lambda specifiers The `mutable` is redundant as nothing in the lambda body need to modify captured variables. --- src/base/bittorrent/sessionimpl.cpp | 2 +- src/base/bittorrent/torrentimpl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/bittorrent/sessionimpl.cpp b/src/base/bittorrent/sessionimpl.cpp index 32034d370..ad6fe5f26 100644 --- a/src/base/bittorrent/sessionimpl.cpp +++ b/src/base/bittorrent/sessionimpl.cpp @@ -6328,7 +6328,7 @@ void SessionImpl::loadStatistics() void SessionImpl::updateTrackerEntryStatuses(lt::torrent_handle torrentHandle) { - invokeAsync([this, torrentHandle = std::move(torrentHandle)]() mutable + invokeAsync([this, torrentHandle = std::move(torrentHandle)]() { try { diff --git a/src/base/bittorrent/torrentimpl.cpp b/src/base/bittorrent/torrentimpl.cpp index fc6f70f77..7a6161087 100644 --- a/src/base/bittorrent/torrentimpl.cpp +++ b/src/base/bittorrent/torrentimpl.cpp @@ -3117,7 +3117,7 @@ void TorrentImpl::invokeAsync(Func func, Callback resultHandler) const m_session->invokeAsync([session = m_session , func = std::move(func) , resultHandler = std::move(resultHandler) - , thisTorrent = QPointer(this)]() mutable + , thisTorrent = QPointer(this)]() { session->invoke([result = func(), thisTorrent, resultHandler = std::move(resultHandler)] {