Browse Source

Update Badge<T> instantiations to simply be {}.

Andreas Kling 6 years ago
parent
commit
fdf3608c8a

+ 2 - 2
Kernel/FileSystem/Inode.cpp

@@ -78,13 +78,13 @@ void Inode::will_be_destroyed()
 void Inode::inode_contents_changed(off_t offset, ssize_t size, const byte* data)
 {
     if (m_vmo)
-        m_vmo->inode_contents_changed(Badge<Inode>(), offset, size, data);
+        m_vmo->inode_contents_changed({}, offset, size, data);
 }
 
 void Inode::inode_size_changed(size_t old_size, size_t new_size)
 {
     if (m_vmo)
-        m_vmo->inode_size_changed(Badge<Inode>(), old_size, new_size);
+        m_vmo->inode_size_changed({}, old_size, new_size);
 }
 
 int Inode::set_atime(time_t)

+ 1 - 1
Kernel/FileSystem/VirtualFileSystem.cpp

@@ -189,7 +189,7 @@ KResultOr<Retained<FileDescriptor>> VFS::open(StringView path, int options, mode
         auto descriptor_or_error = (*it).value->open(options);
         if (descriptor_or_error.is_error())
             return descriptor_or_error.error();
-        descriptor_or_error.value()->set_original_inode(Badge<VFS>(), inode);
+        descriptor_or_error.value()->set_original_inode({}, inode);
         return descriptor_or_error;
     }
     if (should_truncate_file)

+ 1 - 1
Kernel/TTY/MasterPTY.cpp

@@ -23,7 +23,7 @@ MasterPTY::~MasterPTY()
 #ifdef MASTERPTY_DEBUG
     dbgprintf("~MasterPTY(%u)\n", m_index);
 #endif
-    PTYMultiplexer::the().notify_master_destroyed(Badge<MasterPTY>(), m_index);
+    PTYMultiplexer::the().notify_master_destroyed({}, m_index);
 }
 
 String MasterPTY::pts_name() const

+ 1 - 1
Kernel/TTY/SlavePTY.cpp

@@ -62,5 +62,5 @@ ssize_t SlavePTY::read(FileDescriptor& descriptor, byte* buffer, ssize_t size)
 
 void SlavePTY::close()
 {
-    m_master->notify_slave_closed(Badge<SlavePTY>());
+    m_master->notify_slave_closed({});
 }

+ 2 - 2
LibCore/CNotifier.cpp

@@ -6,10 +6,10 @@ CNotifier::CNotifier(int fd, unsigned event_mask)
     : m_fd(fd)
     , m_event_mask(event_mask)
 {
-    CEventLoop::register_notifier(Badge<CNotifier>(), *this);
+    CEventLoop::register_notifier({}, *this);
 }
 
 CNotifier::~CNotifier()
 {
-    CEventLoop::unregister_notifier(Badge<CNotifier>(), *this);
+    CEventLoop::unregister_notifier({}, *this);
 }

+ 2 - 2
LibGUI/GAbstractView.cpp

@@ -20,10 +20,10 @@ void GAbstractView::set_model(RetainPtr<GModel>&& model)
     if (model == m_model)
         return;
     if (m_model)
-        m_model->unregister_view(Badge<GAbstractView>(), *this);
+        m_model->unregister_view({}, *this);
     m_model = move(model);
     if (m_model)
-        m_model->register_view(Badge<GAbstractView>(), *this);
+        m_model->register_view({}, *this);
     did_update_model();
 }
 

+ 4 - 4
LibGUI/GAction.cpp

@@ -39,19 +39,19 @@ GAction::GAction(const String& text, const GShortcut& shortcut, RetainPtr<Graphi
 {
     if (m_widget) {
         m_scope = ShortcutScope::WidgetLocal;
-        m_widget->register_local_shortcut_action(Badge<GAction>(), *this);
+        m_widget->register_local_shortcut_action({}, *this);
     } else {
         m_scope = ShortcutScope::ApplicationGlobal;
-        GApplication::the().register_global_shortcut_action(Badge<GAction>(), *this);
+        GApplication::the().register_global_shortcut_action({}, *this);
     }
 }
 
 GAction::~GAction()
 {
     if (m_shortcut.is_valid() && m_scope == ShortcutScope::ApplicationGlobal)
-        GApplication::the().unregister_global_shortcut_action(Badge<GAction>(), *this);
+        GApplication::the().unregister_global_shortcut_action({}, *this);
     if (m_widget && m_scope == ShortcutScope::WidgetLocal)
-        m_widget->unregister_local_shortcut_action(Badge<GAction>(), *this);
+        m_widget->unregister_local_shortcut_action({}, *this);
 }
 
 void GAction::activate()

+ 2 - 2
LibGUI/GApplication.cpp

@@ -46,10 +46,10 @@ void GApplication::quit(int exit_code)
 void GApplication::set_menubar(OwnPtr<GMenuBar>&& menubar)
 {
     if (m_menubar)
-        m_menubar->notify_removed_from_application(Badge<GApplication>());
+        m_menubar->notify_removed_from_application({});
     m_menubar = move(menubar);
     if (m_menubar)
-        m_menubar->notify_added_to_application(Badge<GApplication>());
+        m_menubar->notify_added_to_application({});
 }
 
 void GApplication::register_global_shortcut_action(Badge<GAction>, GAction& action)

+ 2 - 2
LibGUI/GEventLoop.cpp

@@ -243,7 +243,7 @@ void GEventLoop::process_unprocessed_bundles()
         }
 
         if (event.type == WSAPI_ServerMessage::Type::ScreenRectChanged) {
-            GDesktop::the().did_receive_screen_rect(Badge<GEventLoop>(), event.screen.rect);
+            GDesktop::the().did_receive_screen_rect({}, event.screen.rect);
             continue;
         }
 
@@ -414,5 +414,5 @@ void GEventLoop::handle_greeting(WSAPI_ServerMessage& message)
 {
     s_server_pid = message.greeting.server_pid;
     s_my_client_id = message.greeting.your_client_id;
-    GDesktop::the().did_receive_screen_rect(Badge<GEventLoop>(), message.greeting.screen_rect);
+    GDesktop::the().did_receive_screen_rect({}, message.greeting.screen_rect);
 }

+ 4 - 4
LibGUI/GLayout.cpp

@@ -26,7 +26,7 @@ void GLayout::add_entry(Entry&& entry)
 {
     m_entries.append(move(entry));
     if (m_owner)
-        m_owner->notify_layout_changed(Badge<GLayout>());
+        m_owner->notify_layout_changed({});
 }
 
 void GLayout::add_spacer()
@@ -58,7 +58,7 @@ void GLayout::remove_widget(GWidget& widget)
         return entry.widget == &widget;
     });
     if (m_owner)
-        m_owner->notify_layout_changed(Badge<GLayout>());
+        m_owner->notify_layout_changed({});
 }
 
 void GLayout::set_spacing(int spacing)
@@ -67,7 +67,7 @@ void GLayout::set_spacing(int spacing)
         return;
     m_spacing = spacing;
     if (m_owner)
-        m_owner->notify_layout_changed(Badge<GLayout>());
+        m_owner->notify_layout_changed({});
 }
 
 void GLayout::set_margins(const GMargins& margins)
@@ -76,5 +76,5 @@ void GLayout::set_margins(const GMargins& margins)
         return;
     m_margins = margins;
     if (m_owner)
-        m_owner->notify_layout_changed(Badge<GLayout>());
+        m_owner->notify_layout_changed({});
 }

+ 2 - 2
LibGUI/GWidget.cpp

@@ -131,10 +131,10 @@ void GWidget::handle_paint_event(GPaintEvent& event)
 void GWidget::set_layout(OwnPtr<GLayout>&& layout)
 {
     if (m_layout)
-        m_layout->notify_disowned(Badge<GWidget>(), *this);
+        m_layout->notify_disowned({}, *this);
     m_layout = move(layout);
     if (m_layout) {
-        m_layout->notify_adopted(Badge<GWidget>(), *this);
+        m_layout->notify_adopted({}, *this);
         do_layout();
     } else {
         update();