1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 12:45:07 +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:
Andreas Kling 2021-01-01 15:58:07 +01:00
parent 32fd59b471
commit 42179715c3
5 changed files with 2 additions and 8 deletions

View file

@ -45,7 +45,7 @@ int Dialog::exec()
{
ASSERT(!m_event_loop);
m_event_loop = make<Core::EventLoop>();
if (parent() && parent()->is_window()) {
if (parent() && is<Window>(parent())) {
auto& parent_window = *static_cast<Window*>(parent());
if (parent_window.is_visible()) {
center_within(parent_window);