1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-03 04:22:13 +00:00

LibGUI: Convert Vector<OwnPtr> to NonnullOwnPtrVector.

This is turning out really nice so far. :^)
This commit is contained in:
Andreas Kling 2019-07-24 09:12:23 +02:00
parent 90ea4918d6
commit 2196f17c10
7 changed files with 46 additions and 47 deletions

View file

@ -80,7 +80,7 @@ int GMenu::realize_menu()
#endif
ASSERT(m_menu_id > 0);
for (int i = 0; i < m_items.size(); ++i) {
auto& item = *m_items[i];
auto& item = m_items[i];
item.set_menu_id({}, m_menu_id);
item.set_identifier({}, i);
if (item.type() == GMenuItem::Separator) {
@ -136,5 +136,5 @@ GAction* GMenu::action_at(int index)
{
if (index >= m_items.size())
return nullptr;
return m_items[index]->action();
return m_items[index].action();
}