mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
Fix potential use-after-move
The evaluation order for function parameters is unspecified in C++.
https://stackoverflow.com/questions/2934904/order-of-evaluation-in-c-function-parameters
Fix up 1b2ff0f6f8
.
This commit is contained in:
parent
f4deb1050f
commit
3c139ca333
@ -6091,7 +6091,8 @@ void SessionImpl::processTrackerStatuses()
|
|||||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||||
updatedTrackerEntries[trackerEntry.url] = std::move(trackerEntry);
|
updatedTrackerEntries[trackerEntry.url] = std::move(trackerEntry);
|
||||||
#else
|
#else
|
||||||
updatedTrackerEntries.emplace(trackerEntry.url, std::move(trackerEntry));
|
const QString url = trackerEntry.url;
|
||||||
|
updatedTrackerEntries.emplace(url, std::move(trackerEntry));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user