mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 16:58:06 -06:00
Make use of std algorithms
This commit is contained in:
@@ -841,11 +841,10 @@ bool TorrentHandle::hasError() const
|
||||
bool TorrentHandle::hasFilteredPieces() const
|
||||
{
|
||||
const std::vector<int> pp = m_nativeHandle.piece_priorities();
|
||||
|
||||
for (const int priority : pp)
|
||||
if (priority == 0) return true;
|
||||
|
||||
return false;
|
||||
return std::any_of(pp.cbegin(), pp.cend(), [](const int priority)
|
||||
{
|
||||
return (priority == 0);
|
||||
});
|
||||
}
|
||||
|
||||
int TorrentHandle::queuePosition() const
|
||||
|
||||
Reference in New Issue
Block a user