1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:17:45 +00:00

Convert HashMap<Key, OwnPtr<T>> to HashMap<Key, NonnullOwnPtr<T>>.

In every case I found, we never wanted to support null entry values.
With NonnullOwnPtr, we can encode that at the type level. :^)
This commit is contained in:
Andreas Kling 2019-07-24 08:42:55 +02:00
parent 3c5befde36
commit 93489fbc4c
8 changed files with 13 additions and 13 deletions

View file

@ -78,9 +78,9 @@ private:
void post_error(const String&);
HashMap<int, OwnPtr<WSWindow>> m_windows;
HashMap<int, OwnPtr<WSMenuBar>> m_menubars;
HashMap<int, OwnPtr<WSMenu>> m_menus;
HashMap<int, NonnullOwnPtr<WSWindow>> m_windows;
HashMap<int, NonnullOwnPtr<WSMenuBar>> m_menubars;
HashMap<int, NonnullOwnPtr<WSMenu>> m_menus;
WeakPtr<WSMenuBar> m_app_menubar;
int m_next_menubar_id { 10000 };