diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/network/torrent/torrentclient.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp index 6ae5339d28..a63e927e09 100644 --- a/examples/network/torrent/torrentclient.cpp +++ b/examples/network/torrent/torrentclient.cpp @@ -1501,9 +1501,7 @@ void TorrentClient::addToPeerList(const QList<TorrentPeer> &peerList) }; // Remove inactive peers from the peer list until we're below // the max connections count. - d->peers.erase(std::remove_if(d->peers.begin(), d->peers.end(), - firstNInactivePeers), - d->peers.end()); + d->peers.removeIf(firstNInactivePeers); // If we still have too many peers, remove the oldest ones. d->peers.erase(d->peers.begin(), d->peers.begin() + tooMany); } |