mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -06:00
Use library provided erase_if()
`Algorithm::removeIf()` is still valuable as `QHash::removeIf()` predicate require an iterator or a `std::pair`, which both require more code to unpack the variable and therefore cumbersome to use. PR #19353.
This commit is contained in:
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
ThisType &intersect(const ThisType &other)
|
||||
{
|
||||
Algorithm::removeIf(*this, [&other](const value_type &value) -> bool
|
||||
std::erase_if(*this, [&other](const value_type &value) -> bool
|
||||
{
|
||||
return !other.contains(value);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user