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

DevTools: 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-15 13:28:01 -07:00 committed by Tim Flynn
parent 84f87a9f76
commit 7070713ec8
50 changed files with 75 additions and 122 deletions

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -32,8 +33,4 @@ CodeDocument::CodeDocument(Client* client)
{ {
} }
CodeDocument::~CodeDocument()
{
}
} }

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -14,7 +15,7 @@ namespace HackStudio {
class CodeDocument final : public GUI::TextDocument { class CodeDocument final : public GUI::TextDocument {
public: public:
virtual ~CodeDocument() override; virtual ~CodeDocument() override = default;
static NonnullRefPtr<CodeDocument> create(const String& file_path, Client* client = nullptr); static NonnullRefPtr<CodeDocument> create(const String& file_path, Client* client = nullptr);
static NonnullRefPtr<CodeDocument> create(Client* client = nullptr); static NonnullRefPtr<CodeDocument> create(Client* client = nullptr);

View file

@ -1,6 +1,7 @@
/* /*
* Copyright (c) 2021, Matthew Olsson <matthewcolsson@gmail.com> * Copyright (c) 2021, Matthew Olsson <matthewcolsson@gmail.com>
* Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com> * Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -25,10 +26,6 @@ DebuggerVariableJSObject::DebuggerVariableJSObject(const Debug::DebugInfo::Varia
{ {
} }
DebuggerVariableJSObject::~DebuggerVariableJSObject()
{
}
JS::ThrowCompletionOr<bool> DebuggerVariableJSObject::internal_set(const JS::PropertyKey& property_key, JS::Value value, JS::Value) JS::ThrowCompletionOr<bool> DebuggerVariableJSObject::internal_set(const JS::PropertyKey& property_key, JS::Value value, JS::Value)
{ {
auto& vm = this->vm(); auto& vm = this->vm();

View file

@ -1,6 +1,7 @@
/* /*
* Copyright (c) 2021, Matthew Olsson <matthewcolsson@gmail.com> * Copyright (c) 2021, Matthew Olsson <matthewcolsson@gmail.com>
* Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com> * Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -21,7 +22,7 @@ public:
static DebuggerVariableJSObject* create(DebuggerGlobalJSObject&, const Debug::DebugInfo::VariableInfo& variable_info); static DebuggerVariableJSObject* create(DebuggerGlobalJSObject&, const Debug::DebugInfo::VariableInfo& variable_info);
DebuggerVariableJSObject(const Debug::DebugInfo::VariableInfo& variable_info, JS::Object& prototype); DebuggerVariableJSObject(const Debug::DebugInfo::VariableInfo& variable_info, JS::Object& prototype);
virtual ~DebuggerVariableJSObject() override; virtual ~DebuggerVariableJSObject() override = default;
virtual const char* class_name() const override { return m_variable_info.type_name.characters(); } virtual const char* class_name() const override { return m_variable_info.type_name.characters(); }

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Luke Wilde <lukew@serenityos.org> * Copyright (c) 2020, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -67,10 +68,6 @@ DisassemblyModel::DisassemblyModel(const Debug::DebugSession& debug_session, con
} }
} }
DisassemblyModel::~DisassemblyModel()
{
}
int DisassemblyModel::row_count(const GUI::ModelIndex&) const int DisassemblyModel::row_count(const GUI::ModelIndex&) const
{ {
return m_instructions.size(); return m_instructions.size();

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Luke Wilde <lukew@serenityos.org> * Copyright (c) 2020, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -40,7 +41,7 @@ public:
__Count __Count
}; };
virtual ~DisassemblyModel() override; virtual ~DisassemblyModel() override = default;
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override; virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return Column::__Count; } virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return Column::__Count; }

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Luke Wilde <lukew@serenityos.org> * Copyright (c) 2020, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -93,10 +94,6 @@ RegistersModel::RegistersModel(const PtraceRegisters& current_regs, const Ptrace
m_registers.append({ "gs", current_regs.gs, current_regs.gs != previous_regs.gs }); m_registers.append({ "gs", current_regs.gs, current_regs.gs != previous_regs.gs });
} }
RegistersModel::~RegistersModel()
{
}
int RegistersModel::row_count(const GUI::ModelIndex&) const int RegistersModel::row_count(const GUI::ModelIndex&) const
{ {
return m_registers.size(); return m_registers.size();

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Luke Wilde <lukew@serenityos.org> * Copyright (c) 2020, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -36,7 +37,7 @@ public:
__Count __Count
}; };
virtual ~RegistersModel() override; virtual ~RegistersModel() override = default;
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override; virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return Column::__Count; } virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return Column::__Count; }

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Nick Vella <nick@nxk.io> * Copyright (c) 2021, Nick Vella <nick@nxk.io>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -101,10 +102,6 @@ NewProjectDialog::NewProjectDialog(GUI::Window* parent)
}; };
} }
NewProjectDialog::~NewProjectDialog()
{
}
RefPtr<ProjectTemplate> NewProjectDialog::selected_template() RefPtr<ProjectTemplate> NewProjectDialog::selected_template()
{ {
if (m_icon_view->selection().is_empty()) { if (m_icon_view->selection().is_empty()) {

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Nick Vella <nick@nxk.io> * Copyright (c) 2021, Nick Vella <nick@nxk.io>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -27,7 +28,7 @@ public:
private: private:
NewProjectDialog(GUI::Window* parent); NewProjectDialog(GUI::Window* parent);
virtual ~NewProjectDialog() override; virtual ~NewProjectDialog() override = default;
void update_dialog(); void update_dialog();
Optional<String> get_available_project_name(); Optional<String> get_available_project_name();

View file

@ -1,6 +1,7 @@
/* /*
* Copyright (c) 2021, Nick Vella <nick@nxk.io> * Copyright (c) 2021, Nick Vella <nick@nxk.io>
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com> * Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -42,10 +43,6 @@ ProjectTemplatesModel::ProjectTemplatesModel()
rescan_templates(); rescan_templates();
} }
ProjectTemplatesModel::~ProjectTemplatesModel()
{
}
int ProjectTemplatesModel::row_count(const GUI::ModelIndex&) const int ProjectTemplatesModel::row_count(const GUI::ModelIndex&) const
{ {
return m_mapping.size(); return m_mapping.size();

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Nick Vella <nick@nxk.io> * Copyright (c) 2021, Nick Vella <nick@nxk.io>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -29,7 +30,7 @@ public:
__Count __Count
}; };
virtual ~ProjectTemplatesModel() override; virtual ~ProjectTemplatesModel() override = default;
RefPtr<ProjectTemplate> template_for_index(const GUI::ModelIndex& index); RefPtr<ProjectTemplate> template_for_index(const GUI::ModelIndex& index);

View file

@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2018-2021, the SerenityOS developers. * Copyright (c) 2018-2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -79,10 +79,6 @@ Editor::Editor()
set_gutter_visible(true); set_gutter_visible(true);
} }
Editor::~Editor()
{
}
ErrorOr<void> Editor::initialize_documentation_tooltip() ErrorOr<void> Editor::initialize_documentation_tooltip()
{ {
m_documentation_tooltip_window = GUI::Window::construct(); m_documentation_tooltip_window = GUI::Window::construct();

View file

@ -1,7 +1,7 @@
/* /*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2020-2022, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2020-2022, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2018-2021, the SerenityOS developers. * Copyright (c) 2018-2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -26,7 +26,7 @@ class Editor final : public GUI::TextEditor {
public: public:
static ErrorOr<NonnullRefPtr<Editor>> try_create(); static ErrorOr<NonnullRefPtr<Editor>> try_create();
virtual ~Editor() override; virtual ~Editor() override = default;
Function<void()> on_focus; Function<void()> on_focus;
Function<void(String)> on_open; Function<void(String)> on_open;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -48,10 +49,6 @@ EditorWrapper::EditorWrapper()
}; };
} }
EditorWrapper::~EditorWrapper()
{
}
void EditorWrapper::set_editor_has_focus(Badge<Editor>, bool focus) void EditorWrapper::set_editor_has_focus(Badge<Editor>, bool focus)
{ {
auto& font = Gfx::FontDatabase::default_font(); auto& font = Gfx::FontDatabase::default_font();

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -24,7 +25,7 @@ class EditorWrapper : public GUI::Widget {
C_OBJECT(EditorWrapper) C_OBJECT(EditorWrapper)
public: public:
virtual ~EditorWrapper() override; virtual ~EditorWrapper() override = default;
Editor& editor() { return *m_editor; } Editor& editor() { return *m_editor; }
const Editor& editor() const { return *m_editor; } const Editor& editor() const { return *m_editor; }

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -16,10 +17,6 @@
namespace HackStudio { namespace HackStudio {
DiffViewer::~DiffViewer()
{
}
void DiffViewer::paint_event(GUI::PaintEvent& event) void DiffViewer::paint_event(GUI::PaintEvent& event)
{ {
GUI::Painter painter(*this); GUI::Painter painter(*this);

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -15,7 +16,7 @@ namespace HackStudio {
class DiffViewer final : public GUI::AbstractScrollableWidget { class DiffViewer final : public GUI::AbstractScrollableWidget {
C_OBJECT(DiffViewer) C_OBJECT(DiffViewer)
public: public:
virtual ~DiffViewer() override; virtual ~DiffViewer() override = default;
void set_content(const String& original, const String& diff); void set_content(const String& original, const String& diff);

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -11,9 +12,6 @@
#include <LibGfx/Palette.h> #include <LibGfx/Palette.h>
namespace HackStudio { namespace HackStudio {
GitFilesView::~GitFilesView()
{
}
void GitFilesView::paint_list_item(GUI::Painter& painter, int row_index, int painted_item_index) void GitFilesView::paint_list_item(GUI::Painter& painter, int row_index, int painted_item_index)
{ {

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -17,7 +18,7 @@ using GitFileActionCallback = Function<void(String const& file)>;
class GitFilesView : public GUI::ListView { class GitFilesView : public GUI::ListView {
C_OBJECT(GitFilesView) C_OBJECT(GitFilesView)
public: public:
virtual ~GitFilesView() override; virtual ~GitFilesView() override = default;
protected: protected:
GitFilesView(GitFileActionCallback, NonnullRefPtr<Gfx::Bitmap> action_icon); GitFilesView(GitFileActionCallback, NonnullRefPtr<Gfx::Bitmap> action_icon);

View file

@ -1,7 +1,7 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2020-2021, the SerenityOS developers. * Copyright (c) 2020-2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -20,10 +21,6 @@ ClientConnection::ClientConnection(NonnullOwnPtr<Core::Stream::LocalSocket> sock
s_connections.set(1, *this); s_connections.set(1, *this);
} }
ClientConnection::~ClientConnection()
{
}
void ClientConnection::die() void ClientConnection::die()
{ {
s_connections.remove(client_id()); s_connections.remove(client_id());

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -21,7 +22,7 @@ namespace LanguageServers {
class ClientConnection : public IPC::ClientConnection<LanguageClientEndpoint, LanguageServerEndpoint> { class ClientConnection : public IPC::ClientConnection<LanguageClientEndpoint, LanguageServerEndpoint> {
public: public:
explicit ClientConnection(NonnullOwnPtr<Core::Stream::LocalSocket>); explicit ClientConnection(NonnullOwnPtr<Core::Stream::LocalSocket>);
~ClientConnection() override; ~ClientConnection() override = default;
virtual void die() override; virtual void die() override;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2021, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -14,9 +15,6 @@ CodeComprehensionEngine::CodeComprehensionEngine(const FileDB& filedb, bool shou
{ {
} }
CodeComprehensionEngine::~CodeComprehensionEngine()
{
}
void CodeComprehensionEngine::set_declarations_of_document(const String& filename, Vector<GUI::AutocompleteProvider::Declaration>&& declarations) void CodeComprehensionEngine::set_declarations_of_document(const String& filename, Vector<GUI::AutocompleteProvider::Declaration>&& declarations)
{ {
// Callback may not be configured if we're running tests // Callback may not be configured if we're running tests

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Itamar S. <itamar8910@gmail.com> * Copyright (c) 2021, Itamar S. <itamar8910@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -18,7 +19,7 @@ class ClientConnection;
class CodeComprehensionEngine { class CodeComprehensionEngine {
public: public:
CodeComprehensionEngine(const FileDB& filedb, bool store_all_declarations = false); CodeComprehensionEngine(const FileDB& filedb, bool store_all_declarations = false);
virtual ~CodeComprehensionEngine(); virtual ~CodeComprehensionEngine() = default;
virtual Vector<GUI::AutocompleteProvider::Entry> get_suggestions(const String& file, const GUI::TextPosition& autocomplete_position) = 0; virtual Vector<GUI::AutocompleteProvider::Entry> get_suggestions(const String& file, const GUI::TextPosition& autocomplete_position) = 0;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -157,10 +158,6 @@ Locator::Locator(Core::Object* parent)
}; };
} }
Locator::~Locator()
{
}
void Locator::open_suggestion(const GUI::ModelIndex& index) void Locator::open_suggestion(const GUI::ModelIndex& index)
{ {
auto& model = reinterpret_cast<LocatorSuggestionModel&>(*m_suggestion_view->model()); auto& model = reinterpret_cast<LocatorSuggestionModel&>(*m_suggestion_view->model());

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -14,7 +15,7 @@ namespace HackStudio {
class Locator final : public GUI::Widget { class Locator final : public GUI::Widget {
C_OBJECT(Locator) C_OBJECT(Locator)
public: public:
virtual ~Locator() override; virtual ~Locator() override = default;
void open(); void open();
void close(); void close();

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -203,10 +204,6 @@ TerminalWrapper::TerminalWrapper(bool user_spawned)
run_command("Shell"); run_command("Shell");
} }
TerminalWrapper::~TerminalWrapper()
{
}
int TerminalWrapper::child_exit_status() const int TerminalWrapper::child_exit_status() const
{ {
VERIFY(m_child_exit_status.has_value()); VERIFY(m_child_exit_status.has_value());

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -15,7 +16,7 @@ namespace HackStudio {
class TerminalWrapper final : public GUI::Widget { class TerminalWrapper final : public GUI::Widget {
C_OBJECT(TerminalWrapper) C_OBJECT(TerminalWrapper)
public: public:
virtual ~TerminalWrapper() override; virtual ~TerminalWrapper() override = default;
enum class WaitForExit { enum class WaitForExit {
No, No,
Yes Yes

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -22,10 +23,6 @@ RemoteObjectGraphModel::RemoteObjectGraphModel(RemoteProcess& process)
m_timer_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/timer.png").release_value_but_fixme_should_propagate_errors()); m_timer_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/timer.png").release_value_but_fixme_should_propagate_errors());
} }
RemoteObjectGraphModel::~RemoteObjectGraphModel()
{
}
GUI::ModelIndex RemoteObjectGraphModel::index(int row, int column, const GUI::ModelIndex& parent) const GUI::ModelIndex RemoteObjectGraphModel::index(int row, int column, const GUI::ModelIndex& parent) const
{ {
if (!parent.is_valid()) { if (!parent.is_valid()) {

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -22,7 +23,7 @@ public:
return adopt_ref(*new RemoteObjectGraphModel(process)); return adopt_ref(*new RemoteObjectGraphModel(process));
} }
virtual ~RemoteObjectGraphModel() override; virtual ~RemoteObjectGraphModel() override = default;
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override; virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override; virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -122,10 +123,6 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
} }
} }
DisassemblyModel::~DisassemblyModel()
{
}
int DisassemblyModel::row_count(GUI::ModelIndex const&) const int DisassemblyModel::row_count(GUI::ModelIndex const&) const
{ {
return m_instructions.size(); return m_instructions.size();

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -41,7 +42,7 @@ public:
__Count __Count
}; };
virtual ~DisassemblyModel() override; virtual ~DisassemblyModel() override = default;
virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override; virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; } virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; }

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -17,10 +18,6 @@ IndividualSampleModel::IndividualSampleModel(Profile& profile, size_t event_inde
{ {
} }
IndividualSampleModel::~IndividualSampleModel()
{
}
int IndividualSampleModel::row_count(GUI::ModelIndex const&) const int IndividualSampleModel::row_count(GUI::ModelIndex const&) const
{ {
auto const& event = m_profile.events().at(m_event_index); auto const& event = m_profile.events().at(m_event_index);

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -26,7 +27,7 @@ public:
__Count __Count
}; };
virtual ~IndividualSampleModel() override; virtual ~IndividualSampleModel() override = default;
virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override; virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override; virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -19,10 +20,6 @@ ProfileModel::ProfileModel(Profile& profile)
m_kernel_frame_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/inspector-object-red.png").release_value_but_fixme_should_propagate_errors()); m_kernel_frame_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/inspector-object-red.png").release_value_but_fixme_should_propagate_errors());
} }
ProfileModel::~ProfileModel()
{
}
GUI::ModelIndex ProfileModel::index(int row, int column, GUI::ModelIndex const& parent) const GUI::ModelIndex ProfileModel::index(int row, int column, GUI::ModelIndex const& parent) const
{ {
if (!parent.is_valid()) { if (!parent.is_valid()) {

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -28,7 +29,7 @@ public:
__Count __Count
}; };
virtual ~ProfileModel() override; virtual ~ProfileModel() override = default;
virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override; virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override; virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -17,10 +18,6 @@ SamplesModel::SamplesModel(Profile& profile)
m_kernel_frame_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/inspector-object-red.png").release_value_but_fixme_should_propagate_errors()); m_kernel_frame_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/inspector-object-red.png").release_value_but_fixme_should_propagate_errors());
} }
SamplesModel::~SamplesModel()
{
}
int SamplesModel::row_count(GUI::ModelIndex const&) const int SamplesModel::row_count(GUI::ModelIndex const&) const
{ {
return m_profile.filtered_event_indices().size(); return m_profile.filtered_event_indices().size();

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -31,7 +32,7 @@ public:
__Count __Count
}; };
virtual ~SamplesModel() override; virtual ~SamplesModel() override = default;
virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override; virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override; virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -15,10 +16,6 @@ SignpostsModel::SignpostsModel(Profile& profile)
{ {
} }
SignpostsModel::~SignpostsModel()
{
}
int SignpostsModel::row_count(GUI::ModelIndex const&) const int SignpostsModel::row_count(GUI::ModelIndex const&) const
{ {
return m_profile.filtered_signpost_indices().size(); return m_profile.filtered_signpost_indices().size();

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -30,7 +31,7 @@ public:
__Count __Count
}; };
virtual ~SignpostsModel() override; virtual ~SignpostsModel() override = default;
virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override; virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override; virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -31,10 +32,6 @@ TimelineContainer::TimelineContainer(GUI::Widget& header_container, TimelineView
}; };
} }
TimelineContainer::~TimelineContainer()
{
}
void TimelineContainer::did_scroll() void TimelineContainer::did_scroll()
{ {
AbstractScrollableWidget::did_scroll(); AbstractScrollableWidget::did_scroll();

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -16,7 +17,7 @@ class TimelineContainer : public GUI::AbstractScrollableWidget {
C_OBJECT(TimelineContainer); C_OBJECT(TimelineContainer);
public: public:
virtual ~TimelineContainer(); virtual ~TimelineContainer() override = default;
protected: protected:
virtual void did_scroll() override; virtual void did_scroll() override;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -27,10 +28,6 @@ TimelineHeader::TimelineHeader(Profile& profile, Process const& process)
m_text = String::formatted("{} ({})", LexicalPath::basename(m_process.executable), m_process.pid); m_text = String::formatted("{} ({})", LexicalPath::basename(m_process.executable), m_process.pid);
} }
TimelineHeader::~TimelineHeader()
{
}
void TimelineHeader::paint_event(GUI::PaintEvent& event) void TimelineHeader::paint_event(GUI::PaintEvent& event)
{ {
GUI::Frame::paint_event(event); GUI::Frame::paint_event(event);

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -17,7 +18,7 @@ class TimelineHeader final : public GUI::Frame {
C_OBJECT(TimelineHeader); C_OBJECT(TimelineHeader);
public: public:
virtual ~TimelineHeader(); virtual ~TimelineHeader() override = default;
Function<void(bool)> on_selection_change; Function<void(bool)> on_selection_change;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -25,10 +26,6 @@ TimelineTrack::TimelineTrack(TimelineView const& view, Profile const& profile, P
set_frame_thickness(1); set_frame_thickness(1);
} }
TimelineTrack::~TimelineTrack()
{
}
void TimelineTrack::set_scale(float scale) void TimelineTrack::set_scale(float scale)
{ {
set_fixed_width(m_profile.length_in_ms() / scale); set_fixed_width(m_profile.length_in_ms() / scale);

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -19,7 +20,7 @@ class TimelineTrack final : public GUI::Frame {
C_OBJECT(TimelineTrack); C_OBJECT(TimelineTrack);
public: public:
virtual ~TimelineTrack() override; virtual ~TimelineTrack() override = default;
void set_scale(float); void set_scale(float);

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -18,10 +19,6 @@ TimelineView::TimelineView(Profile& profile)
set_shrink_to_fit(true); set_shrink_to_fit(true);
} }
TimelineView::~TimelineView()
{
}
u64 TimelineView::timestamp_at_x(int x) const u64 TimelineView::timestamp_at_x(int x) const
{ {
float column_width = (float)width() / (float)m_profile.length_in_ms(); float column_width = (float)width() / (float)m_profile.length_in_ms();

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -17,7 +18,7 @@ class TimelineView final : public GUI::Widget {
C_OBJECT(TimelineView); C_OBJECT(TimelineView);
public: public:
virtual ~TimelineView() override; virtual ~TimelineView() override = default;
Function<void()> on_selection_change; Function<void()> on_selection_change;
Function<void()> on_scale_change; Function<void()> on_scale_change;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -18,7 +19,7 @@ class Emulator;
class Region { class Region {
public: public:
virtual ~Region() { } virtual ~Region() = default;
const Range& range() const { return m_range; } const Range& range() const { return m_range; }