1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 20:57:44 +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,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -11,10 +12,6 @@ AccountHolder::AccountHolder()
m_mailbox_tree_model = MailboxTreeModel::create(*this);
}
AccountHolder::~AccountHolder()
{
}
void AccountHolder::add_account_with_name_and_mailboxes(String name, Vector<IMAP::ListItem> const& mailboxes)
{
auto account = AccountNode::create(move(name));

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -86,7 +87,7 @@ private:
class AccountHolder {
public:
~AccountHolder();
~AccountHolder() = default;
static NonnullOwnPtr<AccountHolder> create()
{

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -11,10 +12,6 @@ InboxModel::InboxModel(Vector<InboxEntry> entries)
{
}
InboxModel::~InboxModel()
{
}
int InboxModel::row_count(GUI::ModelIndex const&) const
{
return m_entries.size();

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -27,7 +28,7 @@ public:
return adopt_ref(*new InboxModel(move(inbox_entries)));
}
virtual ~InboxModel() override;
virtual ~InboxModel() override = default;
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; }

View file

@ -1,6 +1,7 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2021, Undefine <cqundefine@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -95,10 +96,6 @@ MailWidget::MailWidget()
};
}
MailWidget::~MailWidget()
{
}
bool MailWidget::connect_and_login()
{
auto server = Config::read_string("Mail", "Connection", "Server", {});

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -17,7 +18,7 @@
class MailWidget final : public GUI::Widget {
C_OBJECT(MailWidget)
public:
virtual ~MailWidget() override;
virtual ~MailWidget() override = default;
bool connect_and_login();

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -15,10 +16,6 @@ MailboxTreeModel::MailboxTreeModel(AccountHolder const& account_holder)
m_account_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/home-directory.png").release_value_but_fixme_should_propagate_errors());
}
MailboxTreeModel::~MailboxTreeModel()
{
}
GUI::ModelIndex MailboxTreeModel::index(int row, int column, GUI::ModelIndex const& parent) const
{
if (!parent.is_valid()) {

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -18,7 +19,7 @@ public:
return adopt_ref(*new MailboxTreeModel(account_holder));
}
virtual ~MailboxTreeModel() override;
virtual ~MailboxTreeModel() override = default;
virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;