mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
LibCore: Add Object::remove_all_children()
This commit is contained in:
parent
ddaedbca87
commit
e955c024b2
Notes:
sideshowbarker
2024-07-19 00:33:43 +09:00
Author: https://github.com/linusg
Commit: e955c024b2
Pull-request: https://github.com/SerenityOS/serenity/pull/4573
3 changed files with 8 additions and 4 deletions
|
@ -130,6 +130,12 @@ void Object::remove_child(Object& object)
|
|||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
void Object::remove_all_children()
|
||||
{
|
||||
while (!m_children.is_empty())
|
||||
m_children.first().remove_from_parent();
|
||||
}
|
||||
|
||||
void Object::timer_event(Core::TimerEvent&)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue