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

Applications: 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-02-10 12:28:48 -07:00 committed by Linus Groh
parent 6be75bd5e4
commit 160bda7228
195 changed files with 335 additions and 638 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, the SerenityOS developers.
* Copyright (c) 2021-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -150,7 +150,3 @@ FindDialog::FindDialog()
done(ExecResult::ExecCancel);
};
}
FindDialog::~FindDialog()
{
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, the SerenityOS developers.
* Copyright (c) 2021-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -29,7 +29,7 @@ private:
bool find_all() const { return m_find_all; }
FindDialog();
virtual ~FindDialog() override;
virtual ~FindDialog() override = default;
RefPtr<GUI::TextEditor> m_text_editor;
RefPtr<GUI::Button> m_find_button;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, the SerenityOS developers.
* Copyright (c) 2021-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -146,7 +146,3 @@ GoToOffsetDialog::GoToOffsetDialog()
update_statusbar();
}
GoToOffsetDialog::~GoToOffsetDialog()
{
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, the SerenityOS developers.
* Copyright (c) 2021-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -18,7 +18,7 @@ public:
private:
GoToOffsetDialog();
virtual ~GoToOffsetDialog() override;
virtual ~GoToOffsetDialog() override = default;
void update_statusbar();
int process_input();
int calculate_new_offset(int offset);

View file

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -47,10 +48,6 @@ HexEditor::HexEditor()
m_blink_timer->start();
}
HexEditor::~HexEditor()
{
}
void HexEditor::set_readonly(bool readonly)
{
if (m_readonly == readonly)

View file

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -28,7 +29,7 @@ public:
Text
};
virtual ~HexEditor() override;
virtual ~HexEditor() override = default;
bool is_readonly() const { return m_readonly; }
void set_readonly(bool);

View file

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -202,10 +203,6 @@ HexEditorWidget::HexEditorWidget()
m_editor->set_focus(true);
}
HexEditorWidget::~HexEditorWidget()
{
}
void HexEditorWidget::initialize_menubar(GUI::Window& window)
{
auto& file_menu = window.add_menu("&File");

View file

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -21,7 +22,7 @@ class HexEditor;
class HexEditorWidget final : public GUI::Widget {
C_OBJECT(HexEditorWidget)
public:
virtual ~HexEditorWidget() override;
virtual ~HexEditorWidget() override = default;
void open_file(NonnullRefPtr<Core::File>);
void initialize_menubar(GUI::Window&);
bool request_close();