From fdf3608c8a0c940c27c4528480db7e0ef77cb83d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 31 May 2019 15:44:04 +0200 Subject: [PATCH] Update Badge instantiations to simply be {}. --- Kernel/FileSystem/Inode.cpp | 4 ++-- Kernel/FileSystem/VirtualFileSystem.cpp | 2 +- Kernel/TTY/MasterPTY.cpp | 2 +- Kernel/TTY/SlavePTY.cpp | 2 +- LibCore/CNotifier.cpp | 4 ++-- LibGUI/GAbstractView.cpp | 4 ++-- LibGUI/GAction.cpp | 8 ++++---- LibGUI/GApplication.cpp | 4 ++-- LibGUI/GEventLoop.cpp | 4 ++-- LibGUI/GLayout.cpp | 8 ++++---- LibGUI/GWidget.cpp | 4 ++-- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp index 330e381ca9..38eb0395d1 100644 --- a/Kernel/FileSystem/Inode.cpp +++ b/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(), 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(), old_size, new_size); + m_vmo->inode_size_changed({}, old_size, new_size); } int Inode::set_atime(time_t) diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp index 8aac09d211..e5d2dce86d 100644 --- a/Kernel/FileSystem/VirtualFileSystem.cpp +++ b/Kernel/FileSystem/VirtualFileSystem.cpp @@ -189,7 +189,7 @@ KResultOr> 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(), inode); + descriptor_or_error.value()->set_original_inode({}, inode); return descriptor_or_error; } if (should_truncate_file) diff --git a/Kernel/TTY/MasterPTY.cpp b/Kernel/TTY/MasterPTY.cpp index f4fd8b6b98..22e87495b0 100644 --- a/Kernel/TTY/MasterPTY.cpp +++ b/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(), m_index); + PTYMultiplexer::the().notify_master_destroyed({}, m_index); } String MasterPTY::pts_name() const diff --git a/Kernel/TTY/SlavePTY.cpp b/Kernel/TTY/SlavePTY.cpp index c16319566a..f40392037c 100644 --- a/Kernel/TTY/SlavePTY.cpp +++ b/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()); + m_master->notify_slave_closed({}); } diff --git a/LibCore/CNotifier.cpp b/LibCore/CNotifier.cpp index 000602a4a9..c124191ac1 100644 --- a/LibCore/CNotifier.cpp +++ b/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(), *this); + CEventLoop::register_notifier({}, *this); } CNotifier::~CNotifier() { - CEventLoop::unregister_notifier(Badge(), *this); + CEventLoop::unregister_notifier({}, *this); } diff --git a/LibGUI/GAbstractView.cpp b/LibGUI/GAbstractView.cpp index d9088f4afa..654566f244 100644 --- a/LibGUI/GAbstractView.cpp +++ b/LibGUI/GAbstractView.cpp @@ -20,10 +20,10 @@ void GAbstractView::set_model(RetainPtr&& model) if (model == m_model) return; if (m_model) - m_model->unregister_view(Badge(), *this); + m_model->unregister_view({}, *this); m_model = move(model); if (m_model) - m_model->register_view(Badge(), *this); + m_model->register_view({}, *this); did_update_model(); } diff --git a/LibGUI/GAction.cpp b/LibGUI/GAction.cpp index 4601d9dd90..a2718690d0 100644 --- a/LibGUI/GAction.cpp +++ b/LibGUI/GAction.cpp @@ -39,19 +39,19 @@ GAction::GAction(const String& text, const GShortcut& shortcut, RetainPtrregister_local_shortcut_action(Badge(), *this); + m_widget->register_local_shortcut_action({}, *this); } else { m_scope = ShortcutScope::ApplicationGlobal; - GApplication::the().register_global_shortcut_action(Badge(), *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(), *this); + GApplication::the().unregister_global_shortcut_action({}, *this); if (m_widget && m_scope == ShortcutScope::WidgetLocal) - m_widget->unregister_local_shortcut_action(Badge(), *this); + m_widget->unregister_local_shortcut_action({}, *this); } void GAction::activate() diff --git a/LibGUI/GApplication.cpp b/LibGUI/GApplication.cpp index 2fa219bb15..8f16b07791 100644 --- a/LibGUI/GApplication.cpp +++ b/LibGUI/GApplication.cpp @@ -46,10 +46,10 @@ void GApplication::quit(int exit_code) void GApplication::set_menubar(OwnPtr&& menubar) { if (m_menubar) - m_menubar->notify_removed_from_application(Badge()); + m_menubar->notify_removed_from_application({}); m_menubar = move(menubar); if (m_menubar) - m_menubar->notify_added_to_application(Badge()); + m_menubar->notify_added_to_application({}); } void GApplication::register_global_shortcut_action(Badge, GAction& action) diff --git a/LibGUI/GEventLoop.cpp b/LibGUI/GEventLoop.cpp index 23c2450d89..127adbfead 100644 --- a/LibGUI/GEventLoop.cpp +++ b/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(), 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(), message.greeting.screen_rect); + GDesktop::the().did_receive_screen_rect({}, message.greeting.screen_rect); } diff --git a/LibGUI/GLayout.cpp b/LibGUI/GLayout.cpp index 207ad7883d..1aaa660ecc 100644 --- a/LibGUI/GLayout.cpp +++ b/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()); + 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()); + 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()); + 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()); + m_owner->notify_layout_changed({}); } diff --git a/LibGUI/GWidget.cpp b/LibGUI/GWidget.cpp index 8724ec2a08..30f4284a46 100644 --- a/LibGUI/GWidget.cpp +++ b/LibGUI/GWidget.cpp @@ -131,10 +131,10 @@ void GWidget::handle_paint_event(GPaintEvent& event) void GWidget::set_layout(OwnPtr&& layout) { if (m_layout) - m_layout->notify_disowned(Badge(), *this); + m_layout->notify_disowned({}, *this); m_layout = move(layout); if (m_layout) { - m_layout->notify_adopted(Badge(), *this); + m_layout->notify_adopted({}, *this); do_layout(); } else { update();