mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:18:12 +00:00
LibCore: Add CObject::for_each_child(callback).
This commit is contained in:
parent
3654c33c56
commit
906fde8f8c
2 changed files with 13 additions and 3 deletions
|
@ -100,9 +100,10 @@ void CObject::dump_tree(int indent)
|
|||
}
|
||||
printf("%s{%p}\n", class_name(), this);
|
||||
|
||||
for (auto* child : children()) {
|
||||
child->dump_tree(indent + 2);
|
||||
}
|
||||
for_each_child([&] (auto& child) {
|
||||
child.dump_tree(indent + 2);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
|
||||
void CObject::deferred_invoke(Function<void(CObject&)> invokee)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue