1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

WindowServer: Remove uneeded const_casts for getting a submenu

This commit is contained in:
Shannon Booth 2020-05-18 22:09:05 +12:00 committed by Andreas Kling
parent 41471eb3ae
commit 1048283186
2 changed files with 2 additions and 2 deletions

View file

@ -523,7 +523,7 @@ bool Menu::is_menu_ancestor_of(const Menu& other) const
for (auto& item : m_items) {
if (!item.is_submenu())
continue;
auto& submenu = *const_cast<MenuItem&>(item).submenu();
auto& submenu = *item.submenu();
if (&submenu == &other)
return true;
if (submenu.is_menu_ancestor_of(other))