diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-05-18 14:49:04 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-12-05 00:47:44 +0100 |
commit | 105a66e6543467863a39cd12271f125b45d74179 (patch) | |
tree | 3362c298e5e930b6a7791584fe065aa0f8bd8a57 /src/dbus/qdbusintegrator.cpp | |
parent | f19266bd02a01d4b7b277ea769c4c17727b1e661 (diff) |
Use (new) erase()/erase_if() algorithms
Change-Id: I45c18fd45c20b226e44d16315e3ebb6c305d4ab0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus/qdbusintegrator.cpp')
-rw-r--r-- | src/dbus/qdbusintegrator.cpp | 7 |
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; |