summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GMenuBar.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-24 09:12:23 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-24 09:13:06 +0200
commit2196f17c107d9367d6035da53d955b7382594f1e (patch)
tree37f52d07700ef3cc61761136ed8c41acf6e0bf2f /Libraries/LibGUI/GMenuBar.cpp
parent90ea4918d6c8b011710be2c4a1d7756a07cd45c3 (diff)
downloadserenity-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.cpp5
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;