mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:47:34 +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:
parent
6be75bd5e4
commit
160bda7228
195 changed files with 335 additions and 638 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Cesar Torres <shortanemoia@protonmail.com>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -65,10 +66,6 @@ void BarsVisualizationWidget::paint_event(GUI::PaintEvent& event)
|
|||
m_is_using_last = false;
|
||||
}
|
||||
|
||||
BarsVisualizationWidget::~BarsVisualizationWidget()
|
||||
{
|
||||
}
|
||||
|
||||
BarsVisualizationWidget::BarsVisualizationWidget()
|
||||
: m_last_id(-1)
|
||||
, m_is_using_last(false)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Cesar Torres <shortanemoia@protonmail.com>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -15,7 +16,7 @@ class BarsVisualizationWidget final : public VisualizationWidget {
|
|||
C_OBJECT(BarsVisualizationWidget)
|
||||
|
||||
public:
|
||||
~BarsVisualizationWidget() override;
|
||||
~BarsVisualizationWidget() override = default;
|
||||
void set_buffer(RefPtr<Audio::Buffer> buffer) override;
|
||||
void set_samplerate(int samplerate) override;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Cesar Torres <shortanemoia@protonmail.com>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -7,14 +8,6 @@
|
|||
#include "NoVisualizationWidget.h"
|
||||
#include <LibGUI/Painter.h>
|
||||
|
||||
NoVisualizationWidget::NoVisualizationWidget()
|
||||
{
|
||||
}
|
||||
|
||||
NoVisualizationWidget::~NoVisualizationWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void NoVisualizationWidget::paint_event(GUI::PaintEvent& event)
|
||||
{
|
||||
Frame::paint_event(event);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Cesar Torres <shortanemoia@protonmail.com>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -14,12 +15,12 @@ class NoVisualizationWidget final : public VisualizationWidget {
|
|||
C_OBJECT(NoVisualizationWidget)
|
||||
|
||||
public:
|
||||
~NoVisualizationWidget() override;
|
||||
~NoVisualizationWidget() override = default;
|
||||
void set_buffer(RefPtr<Audio::Buffer>) override;
|
||||
|
||||
private:
|
||||
void paint_event(GUI::PaintEvent&) override;
|
||||
NoVisualizationWidget();
|
||||
NoVisualizationWidget() = default;
|
||||
|
||||
RefPtr<Gfx::Bitmap> m_serenity_bg;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -26,10 +27,6 @@ PlaybackManager::PlaybackManager(NonnullRefPtr<Audio::ClientConnection> connecti
|
|||
m_device_sample_rate = connection->get_sample_rate();
|
||||
}
|
||||
|
||||
PlaybackManager::~PlaybackManager()
|
||||
{
|
||||
}
|
||||
|
||||
void PlaybackManager::set_loader(NonnullRefPtr<Audio::Loader>&& loader)
|
||||
{
|
||||
stop();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -16,7 +17,7 @@
|
|||
class PlaybackManager final {
|
||||
public:
|
||||
PlaybackManager(NonnullRefPtr<Audio::ClientConnection>);
|
||||
~PlaybackManager();
|
||||
~PlaybackManager() = default;
|
||||
|
||||
void play();
|
||||
void stop();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Cesar Torres <shortanemoia@protonmail.com>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -30,7 +31,7 @@ public:
|
|||
};
|
||||
|
||||
explicit Player(Audio::ClientConnection& audio_client_connection);
|
||||
virtual ~Player() { }
|
||||
virtual ~Player() = default;
|
||||
|
||||
void play_file_path(String const& path);
|
||||
bool is_playlist(String const& path);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -9,14 +10,6 @@
|
|||
#include <LibAudio/Buffer.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
|
||||
SampleWidget::SampleWidget()
|
||||
{
|
||||
}
|
||||
|
||||
SampleWidget::~SampleWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void SampleWidget::paint_event(GUI::PaintEvent& event)
|
||||
{
|
||||
GUI::Frame::paint_event(event);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -16,12 +17,12 @@ class Buffer;
|
|||
class SampleWidget final : public VisualizationWidget {
|
||||
C_OBJECT(SampleWidget)
|
||||
public:
|
||||
virtual ~SampleWidget() override;
|
||||
virtual ~SampleWidget() override = default;
|
||||
|
||||
void set_buffer(RefPtr<Audio::Buffer>) override;
|
||||
|
||||
private:
|
||||
SampleWidget();
|
||||
SampleWidget() = default;
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
|
||||
RefPtr<Audio::Buffer> m_buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue