mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:15:09 +00:00
LibCore: Remove some hand-rolled type information from Core::Object
Both is_action() and is_window() can be answered by RTTI.
This commit is contained in:
parent
32fd59b471
commit
42179715c3
5 changed files with 2 additions and 8 deletions
|
@ -142,7 +142,7 @@ void Window::show()
|
|||
Window* Window::find_parent_window()
|
||||
{
|
||||
for (auto* ancestor = parent(); ancestor; ancestor = ancestor->parent()) {
|
||||
if (ancestor->is_window())
|
||||
if (is<Window>(ancestor))
|
||||
return static_cast<Window*>(ancestor);
|
||||
}
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue