diff --git a/tools/aapt2/dump/DumpManifest.cpp b/tools/aapt2/dump/DumpManifest.cpp index 61ba09b6a3c9a..f2c6b15bc0cd8 100644 --- a/tools/aapt2/dump/DumpManifest.cpp +++ b/tools/aapt2/dump/DumpManifest.cpp @@ -135,7 +135,8 @@ class ManifestExtractor { template void Filter(Predicate&& func) { children_.erase(std::remove_if(children_.begin(), children_.end(), - [&](const auto& e) { return func(e.get()); })); + [&](const auto& e) { return func(e.get()); }), + children_.end()); } /** Retrieves the list of children of the element. */