summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusintegrator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus/qdbusintegrator.cpp')
-rw-r--r--src/dbus/qdbusintegrator.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 114931f3de..6bf9ad7786 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -593,11 +593,8 @@ static void huntAndDestroy(QObject *needle, QDBusConnectionPrivate::ObjectTreeNo
for (auto &node : haystack.children)
huntAndDestroy(needle, node);
- auto isInactive = [](QDBusConnectionPrivate::ObjectTreeNode &node) { return !node.isActive(); };
-
- haystack.children.erase(std::remove_if(haystack.children.begin(), haystack.children.end(),
- isInactive),
- haystack.children.end());
+ auto isInactive = [](const QDBusConnectionPrivate::ObjectTreeNode &node) { return !node.isActive(); };
+ haystack.children.removeIf(isInactive);
if (needle == haystack.obj) {
haystack.obj = nullptr;