mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06:00
Use const accessor
This avoids an unnecessary check to the container internal atomic variable and prevents potential detachment. PR #22280.
This commit is contained in:
@@ -864,7 +864,7 @@ void SyncController::onTorrentAboutToBeRemoved(BitTorrent::Torrent *torrent)
|
||||
|
||||
for (const BitTorrent::TrackerEntryStatus &status : asConst(torrent->trackers()))
|
||||
{
|
||||
auto iter = m_knownTrackers.find(status.url);
|
||||
const auto iter = m_knownTrackers.find(status.url);
|
||||
Q_ASSERT(iter != m_knownTrackers.end());
|
||||
if (iter == m_knownTrackers.end()) [[unlikely]]
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user