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
commit 1048283186
Notes: sideshowbarker 2024-07-19 06:31:20 +09:00
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))