mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
WindowServer: Remove uneeded const_casts for getting a submenu
This commit is contained in:
committed by
Andreas Kling
parent
41471eb3ae
commit
1048283186
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user