summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/collection.hpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/collection.hpp b/lib/collection.hpp
index 8b39ae4..6e05824 100644
--- a/lib/collection.hpp
+++ b/lib/collection.hpp
@@ -55,14 +55,12 @@ public:
}
template<typename T = Object>
- void
+ auto
removeAll()
{
- objects.erase(std::remove_if(objects.begin(), objects.end(),
- [](auto && op) {
- return dynamic_cast<T *>(op.get());
- }),
- objects.end());
+ return std::erase_if(objects, [](auto && op) {
+ return dynamic_cast<T *>(op.get());
+ });
}
auto