mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
Userland/Applets: 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:
parent
04c5bc5e55
commit
f2d8c488ec
|
@ -2,6 +2,7 @@
|
|||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021, kleines Filmröllchen <filmroellchen@serenityos.org>
|
||||
* Copyright (c) 2021, David Isaksson <davidisaksson93@gmail.com>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -134,7 +135,7 @@ private:
|
|||
};
|
||||
|
||||
public:
|
||||
virtual ~AudioWidget() override { }
|
||||
virtual ~AudioWidget() override = default;
|
||||
|
||||
void set_audio_widget_size(bool show_percent)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
|
||||
* Copyright (c) 2021, Mustafa Quraish <mustafa@cs.toronto.edu>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -20,10 +21,6 @@ ClipboardHistoryModel::ClipboardHistoryModel()
|
|||
{
|
||||
}
|
||||
|
||||
ClipboardHistoryModel::~ClipboardHistoryModel()
|
||||
{
|
||||
}
|
||||
|
||||
String ClipboardHistoryModel::column_name(int column) const
|
||||
{
|
||||
switch (column) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
|
||||
* Copyright (c) 2021, Mustafa Quraish <mustafa@cs.toronto.edu>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -25,7 +26,7 @@ public:
|
|||
__Count
|
||||
};
|
||||
|
||||
virtual ~ClipboardHistoryModel() override;
|
||||
virtual ~ClipboardHistoryModel() override = default;
|
||||
|
||||
const GUI::Clipboard::DataAndType& item_at(int index) const { return m_history_items[index]; }
|
||||
void remove_item(int index);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Timur Sultanov <SultanovTS@yandex.ru>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -30,10 +31,6 @@ KeymapStatusWindow::KeymapStatusWindow()
|
|||
m_status_widget->set_text(current_keymap_name.substring(0, 2));
|
||||
}
|
||||
|
||||
KeymapStatusWindow::~KeymapStatusWindow()
|
||||
{
|
||||
}
|
||||
|
||||
void KeymapStatusWindow::wm_event(GUI::WMEvent& event)
|
||||
{
|
||||
if (event.type() == GUI::WMEvent::WM_KeymapChanged) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Timur Sultanov <SultanovTS@yandex.ru>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -17,7 +18,7 @@ class KeymapStatusWidget : public GUI::Label {
|
|||
class KeymapStatusWindow final : public GUI::Window {
|
||||
C_OBJECT(KeymapStatusWindow)
|
||||
public:
|
||||
virtual ~KeymapStatusWindow() override;
|
||||
virtual ~KeymapStatusWindow() override = default;
|
||||
|
||||
private:
|
||||
virtual void wm_event(GUI::WMEvent&) override;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Peter Elliott <pelliott@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -15,9 +16,7 @@ class DesktopStatusWidget : public GUI::Widget {
|
|||
C_OBJECT(DesktopStatusWidget);
|
||||
|
||||
public:
|
||||
virtual ~DesktopStatusWidget() override
|
||||
{
|
||||
}
|
||||
virtual ~DesktopStatusWidget() override = default;
|
||||
|
||||
Gfx::IntRect rect_for_desktop(unsigned row, unsigned col) const
|
||||
{
|
||||
|
@ -94,14 +93,12 @@ public:
|
|||
unsigned gap() const { return m_gap; }
|
||||
|
||||
private:
|
||||
DesktopStatusWidget()
|
||||
{
|
||||
}
|
||||
DesktopStatusWidget() = default;
|
||||
|
||||
unsigned m_gap { 1 };
|
||||
|
||||
unsigned m_current_row;
|
||||
unsigned m_current_col;
|
||||
unsigned m_current_row { 0 };
|
||||
unsigned m_current_col { 0 };
|
||||
};
|
||||
|
||||
DesktopStatusWindow::DesktopStatusWindow()
|
||||
|
@ -114,10 +111,6 @@ DesktopStatusWindow::DesktopStatusWindow()
|
|||
m_widget = &set_main_widget<DesktopStatusWidget>();
|
||||
}
|
||||
|
||||
DesktopStatusWindow::~DesktopStatusWindow()
|
||||
{
|
||||
}
|
||||
|
||||
void DesktopStatusWindow::wm_event(GUI::WMEvent& event)
|
||||
{
|
||||
if (event.type() == GUI::Event::WM_WorkspaceChanged) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Peter Elliott <pelliott@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -14,7 +15,7 @@ class DesktopStatusWindow : public GUI::Window {
|
|||
C_OBJECT(DesktopStatusWindow);
|
||||
|
||||
public:
|
||||
virtual ~DesktopStatusWindow() override;
|
||||
virtual ~DesktopStatusWindow() override = default;
|
||||
|
||||
virtual void wm_event(GUI::WMEvent&) override;
|
||||
|
||||
|
|
Loading…
Reference in a new issue