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:
parent
41471eb3ae
commit
1048283186
2 changed files with 2 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue