mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
WindowServer: Remove redundant check in MenuManager::open_menu()
We've already returned early if the menu is open, so there's no need to verify that it isn't present in the stack of open menus before pushing it onto said stack.
This commit is contained in:
parent
1dc32fed8f
commit
5f8c949ea1
1 changed files with 1 additions and 2 deletions
|
@ -303,8 +303,7 @@ void MenuManager::open_menu(Menu& menu, bool as_current_menu)
|
|||
window->set_visible(true);
|
||||
}
|
||||
|
||||
if (m_open_menu_stack.find_if([&menu](auto& other) { return &menu == other.ptr(); }).is_end())
|
||||
m_open_menu_stack.append(menu);
|
||||
m_open_menu_stack.append(menu);
|
||||
|
||||
if (as_current_menu || !current_menu()) {
|
||||
// Only make this menu the current menu if requested, or if no
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue