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

Services: Use default constructors/destructors

https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
This commit is contained in:
Lenny Maiorani 2022-03-23 20:58:03 -06:00 committed by Brian Gianforcaro
parent 5550905c00
commit 0b7baa7e5a
80 changed files with 50 additions and 202 deletions

View file

@ -159,10 +159,6 @@ ClockWidget::ClockWidget()
};
}
ClockWidget::~ClockWidget()
{
}
void ClockWidget::paint_event(GUI::PaintEvent& event)
{
GUI::Frame::paint_event(event);

View file

@ -22,7 +22,7 @@ class ClockWidget final : public GUI::Frame {
C_OBJECT(ClockWidget);
public:
virtual ~ClockWidget() override;
virtual ~ClockWidget() override = default;
private:
ClockWidget();

View file

@ -112,10 +112,6 @@ QuickLaunchWidget::QuickLaunchWidget()
}
}
QuickLaunchWidget::~QuickLaunchWidget()
{
}
OwnPtr<QuickLaunchEntry> QuickLaunchEntry::create_from_config_value(StringView value)
{
if (!value.starts_with("/") && value.ends_with(".af")) {

View file

@ -78,7 +78,7 @@ class QuickLaunchWidget : public GUI::Frame
C_OBJECT(QuickLaunchWidget);
public:
virtual ~QuickLaunchWidget() override;
virtual ~QuickLaunchWidget() override = default;
virtual void config_key_was_removed(String const&, String const&, String const&) override;
virtual void config_string_did_change(String const&, String const&, String const&, String const&) override;

View file

@ -117,7 +117,3 @@ ShutdownDialog::ShutdownDialog()
// Request WindowServer to re-update us on the current theme as we might've not been alive for the last notification.
refresh_system_theme();
}
ShutdownDialog::~ShutdownDialog()
{
}

View file

@ -17,7 +17,7 @@ public:
private:
ShutdownDialog();
virtual ~ShutdownDialog() override;
virtual ~ShutdownDialog() override = default;
int m_selected_option { -1 };
};

View file

@ -19,10 +19,6 @@ TaskbarButton::TaskbarButton(const WindowIdentifier& identifier)
{
}
TaskbarButton::~TaskbarButton()
{
}
void TaskbarButton::context_menu_event(GUI::ContextMenuEvent&)
{
GUI::ConnectionToWindowMangerServer::the().async_popup_window_menu(

View file

@ -12,7 +12,7 @@
class TaskbarButton final : public GUI::Button {
C_OBJECT(TaskbarButton)
public:
virtual ~TaskbarButton() override;
virtual ~TaskbarButton() override = default;
void update_taskbar_rect();
void clear_taskbar_rect();

View file

@ -30,10 +30,10 @@ class TaskbarWidget final : public GUI::Widget {
C_OBJECT(TaskbarWidget);
public:
virtual ~TaskbarWidget() override { }
virtual ~TaskbarWidget() override = default;
private:
TaskbarWidget() { }
TaskbarWidget() = default;
virtual void paint_event(GUI::PaintEvent& event) override
{
@ -99,10 +99,6 @@ TaskbarWindow::TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu)
m_assistant_app_file = Desktop::AppFile::open(af_path);
}
TaskbarWindow::~TaskbarWindow()
{
}
void TaskbarWindow::show_desktop_button_clicked(unsigned)
{
GUI::ConnectionToWindowMangerServer::the().async_toggle_show_desktop();

View file

@ -18,7 +18,7 @@ class TaskbarWindow final : public GUI::Window {
C_OBJECT(TaskbarWindow);
public:
virtual ~TaskbarWindow() override;
virtual ~TaskbarWindow() override = default;
static int taskbar_height() { return 27; }
static int taskbar_icon_size() { return 16; }