mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 05:08:05 -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:
@@ -97,7 +97,7 @@ void TorrentContentModelFolder::updatePriority()
|
||||
// If all children have the same priority
|
||||
// then the folder should have the same
|
||||
// priority
|
||||
const BitTorrent::DownloadPriority prio = m_childItems.first()->priority();
|
||||
const BitTorrent::DownloadPriority prio = m_childItems.constFirst()->priority();
|
||||
for (int i = 1; i < m_childItems.size(); ++i)
|
||||
{
|
||||
if (m_childItems.at(i)->priority() != prio)
|
||||
|
||||
Reference in New Issue
Block a user