diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-24 09:12:23 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-24 09:13:06 +0200 |
commit | 2196f17c107d9367d6035da53d955b7382594f1e (patch) | |
tree | 37f52d07700ef3cc61761136ed8c41acf6e0bf2f /Libraries/LibGUI/GMenuBar.cpp | |
parent | 90ea4918d6c8b011710be2c4a1d7756a07cd45c3 (diff) | |
download | serenity-2196f17c107d9367d6035da53d955b7382594f1e.zip |
LibGUI: Convert Vector<OwnPtr> to NonnullOwnPtrVector.
This is turning out really nice so far. :^)
Diffstat (limited to 'Libraries/LibGUI/GMenuBar.cpp')
-rw-r--r-- | Libraries/LibGUI/GMenuBar.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Libraries/LibGUI/GMenuBar.cpp b/Libraries/LibGUI/GMenuBar.cpp index f57d9dc896..a48e094a11 100644 --- a/Libraries/LibGUI/GMenuBar.cpp +++ b/Libraries/LibGUI/GMenuBar.cpp @@ -10,7 +10,7 @@ GMenuBar::~GMenuBar() unrealize_menubar(); } -void GMenuBar::add_menu(OwnPtr<GMenu>&& menu) +void GMenuBar::add_menu(NonnullOwnPtr<GMenu>&& menu) { m_menus.append(move(menu)); } @@ -40,8 +40,7 @@ void GMenuBar::notify_added_to_application(Badge<GApplication>) m_menubar_id = realize_menubar(); ASSERT(m_menubar_id != -1); for (auto& menu : m_menus) { - ASSERT(menu); - int menu_id = menu->realize_menu(); + int menu_id = menu.realize_menu(); ASSERT(menu_id != -1); WSAPI_ClientMessage request; request.type = WSAPI_ClientMessage::Type::AddMenuToMenubar; |