diff options
author | Itamar <itamar8910@gmail.com> | 2021-05-08 12:27:12 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-08 18:10:56 +0200 |
commit | 8a01167c7dc5acbbee636c66017f5f35e8766865 (patch) | |
tree | cf33399863bcc4d6a05a6aea7a5c316e92ba3f71 /Userland/Services/Taskbar/main.cpp | |
parent | 1da0d402b7f3476b30d7482ba63d8ad5d215dd96 (diff) | |
download | serenity-8a01167c7dc5acbbee636c66017f5f35e8766865.zip |
AK: Add missing GenericTraits<NonnullRefPtr>
This enables us to use keys of type NonnullRefPtr in HashMaps and
HashTables.
This commit also includes fixes in various places that used
HashMap<T, NonnullRefPtr<U>>::get() and expected to get an
Optional<NonnullRefPtr<U>> and now get an Optional<U*>.
Diffstat (limited to 'Userland/Services/Taskbar/main.cpp')
-rw-r--r-- | Userland/Services/Taskbar/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Services/Taskbar/main.cpp b/Userland/Services/Taskbar/main.cpp index 9d2041ef3e..557621dc68 100644 --- a/Userland/Services/Taskbar/main.cpp +++ b/Userland/Services/Taskbar/main.cpp @@ -144,7 +144,7 @@ NonnullRefPtr<GUI::Menu> build_system_menu() dbgln("App {} has icon with size {}", app.name, icon->size()); } - auto parent_menu = app_category_menus.get(app.category).value_or(*system_menu); + auto parent_menu = app_category_menus.get(app.category).value_or(system_menu.ptr()); parent_menu->add_action(GUI::Action::create(app.name, icon, [app_identifier](auto&) { dbgln("Activated app with ID {}", app_identifier); const auto& bin = g_apps[app_identifier].executable; |