diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-01-01 18:03:02 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-01-10 15:02:47 +0100 |
commit | c34c6af3740052617ee9f0876e2720046f0e6bb7 (patch) | |
tree | 1226e9e7611c606a94ed22f42a44e78ba968a494 /examples | |
parent | b211148e4b4167483e1a78a45ae8fef97e5a4f2d (diff) |
Replace some more erase/remove patterns with removeIf
Change-Id: I6c6f33450fbfd798e5ef71a8ba18f590581dc3a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
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); } |