mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06: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:
@@ -6091,7 +6091,8 @@ void SessionImpl::processTrackerStatuses()
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
updatedTrackerEntries[trackerEntry.url] = std::move(trackerEntry);
|
||||
#else
|
||||
updatedTrackerEntries.emplace(trackerEntry.url, std::move(trackerEntry));
|
||||
const QString url = trackerEntry.url;
|
||||
updatedTrackerEntries.emplace(url, std::move(trackerEntry));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user