mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Services: 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
5550905c00
commit
0b7baa7e5a
80 changed files with 50 additions and 202 deletions
|
@ -29,10 +29,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
s_connections.set(client_id, *this);
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
|
|
|
@ -23,7 +23,7 @@ class Mixer;
|
|||
class ConnectionFromClient final : public IPC::ConnectionFromClient<AudioClientEndpoint, AudioServerEndpoint> {
|
||||
C_OBJECT(ConnectionFromClient)
|
||||
public:
|
||||
~ConnectionFromClient() override;
|
||||
~ConnectionFromClient() override = default;
|
||||
|
||||
void did_finish_playing_buffer(Badge<ClientAudioStream>, int buffer_id);
|
||||
void did_change_client_volume(Badge<ClientAudioStream>, double volume);
|
||||
|
|
|
@ -44,10 +44,6 @@ Mixer::Mixer(NonnullRefPtr<Core::ConfigFile> config)
|
|||
m_sound_thread->start();
|
||||
}
|
||||
|
||||
Mixer::~Mixer()
|
||||
{
|
||||
}
|
||||
|
||||
NonnullRefPtr<ClientAudioStream> Mixer::create_queue(ConnectionFromClient& client)
|
||||
{
|
||||
auto queue = adopt_ref(*new ClientAudioStream(client));
|
||||
|
|
|
@ -35,7 +35,7 @@ class ConnectionFromClient;
|
|||
class ClientAudioStream : public RefCounted<ClientAudioStream> {
|
||||
public:
|
||||
explicit ClientAudioStream(ConnectionFromClient&);
|
||||
~ClientAudioStream() { }
|
||||
~ClientAudioStream() = default;
|
||||
|
||||
bool is_full() const { return m_queue.size() >= 3; }
|
||||
void enqueue(NonnullRefPtr<Audio::Buffer>&&);
|
||||
|
@ -112,7 +112,7 @@ private:
|
|||
class Mixer : public Core::Object {
|
||||
C_OBJECT(Mixer)
|
||||
public:
|
||||
virtual ~Mixer() override;
|
||||
virtual ~Mixer() override = default;
|
||||
|
||||
NonnullRefPtr<ClientAudioStream> create_queue(ConnectionFromClient&);
|
||||
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
class ChessEngine : public Chess::UCI::Endpoint {
|
||||
C_OBJECT(ChessEngine)
|
||||
public:
|
||||
virtual ~ChessEngine() override { }
|
||||
virtual ~ChessEngine() override = default;
|
||||
|
||||
virtual void handle_uci() override;
|
||||
virtual void handle_position(const Chess::UCI::PositionCommand&) override;
|
||||
virtual void handle_go(const Chess::UCI::GoCommand&) override;
|
||||
|
||||
private:
|
||||
ChessEngine() { }
|
||||
ChessEngine() = default;
|
||||
ChessEngine(NonnullRefPtr<Core::IODevice> in, NonnullRefPtr<Core::IODevice> out)
|
||||
: Endpoint(in, out)
|
||||
{
|
||||
|
|
|
@ -25,10 +25,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
s_connections.set(client_id, *this);
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
|
|
|
@ -18,7 +18,7 @@ class ConnectionFromClient final
|
|||
C_OBJECT(ConnectionFromClient);
|
||||
|
||||
public:
|
||||
virtual ~ConnectionFromClient() override;
|
||||
virtual ~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -14,14 +14,6 @@ Storage& Storage::the()
|
|||
return s_the;
|
||||
}
|
||||
|
||||
Storage::Storage()
|
||||
{
|
||||
}
|
||||
|
||||
Storage::~Storage()
|
||||
{
|
||||
}
|
||||
|
||||
void Storage::set_data(Core::AnonymousBuffer data, const String& mime_type, const HashMap<String, String>& metadata)
|
||||
{
|
||||
m_buffer = move(data);
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace Clipboard {
|
|||
class Storage {
|
||||
public:
|
||||
static Storage& the();
|
||||
~Storage();
|
||||
~Storage() = default;
|
||||
|
||||
bool has_data() const { return m_buffer.is_valid(); }
|
||||
|
||||
|
@ -44,7 +44,7 @@ public:
|
|||
const Core::AnonymousBuffer& buffer() const { return m_buffer; }
|
||||
|
||||
private:
|
||||
Storage();
|
||||
Storage() = default;
|
||||
|
||||
String m_mime_type;
|
||||
Core::AnonymousBuffer m_buffer;
|
||||
|
|
|
@ -81,10 +81,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
s_connections.set(client_id, *this);
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace ConfigServer {
|
|||
class ConnectionFromClient final : public IPC::ConnectionFromClient<ConfigClientEndpoint, ConfigServerEndpoint> {
|
||||
C_OBJECT(ConnectionFromClient)
|
||||
public:
|
||||
~ConnectionFromClient() override;
|
||||
~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -201,10 +201,6 @@ ErrorOr<DHCPv4Client::Interfaces> DHCPv4Client::get_discoverable_interfaces()
|
|||
};
|
||||
}
|
||||
|
||||
DHCPv4Client::~DHCPv4Client()
|
||||
{
|
||||
}
|
||||
|
||||
void DHCPv4Client::handle_offer(const DHCPv4Packet& packet, const ParsedDHCPv4Options& options)
|
||||
{
|
||||
dbgln("We were offered {} for {}", packet.yiaddr().to_string(), options.get<u32>(DHCPOption::IPAddressLeaseTime).value_or(0));
|
||||
|
|
|
@ -40,7 +40,7 @@ class DHCPv4Client final : public Core::Object {
|
|||
C_OBJECT(DHCPv4Client)
|
||||
|
||||
public:
|
||||
virtual ~DHCPv4Client() override;
|
||||
virtual ~DHCPv4Client() override = default;
|
||||
|
||||
void dhcp_discover(const InterfaceDescriptor& ifname);
|
||||
void dhcp_request(DHCPv4Transaction& transaction, const DHCPv4Packet& packet);
|
||||
|
|
|
@ -26,10 +26,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
s_connections.set(1, *this);
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
|
|
|
@ -20,7 +20,7 @@ class ConnectionFromClient final
|
|||
C_OBJECT(ConnectionFromClient);
|
||||
|
||||
public:
|
||||
~ConnectionFromClient() override;
|
||||
~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -17,10 +17,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
{
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
Core::EventLoop::current().quit(0);
|
||||
|
|
|
@ -20,7 +20,7 @@ class ConnectionFromClient final
|
|||
C_OBJECT(ConnectionFromClient);
|
||||
|
||||
public:
|
||||
~ConnectionFromClient() override;
|
||||
~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -18,10 +18,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
s_connections.set(client_id, *this);
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
|
|
|
@ -18,7 +18,7 @@ class ConnectionFromClient final
|
|||
C_OBJECT(ConnectionFromClient);
|
||||
|
||||
public:
|
||||
~ConnectionFromClient() override;
|
||||
~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -33,10 +33,6 @@ InspectableProcess::InspectableProcess(pid_t pid, NonnullOwnPtr<Core::Stream::Lo
|
|||
};
|
||||
}
|
||||
|
||||
InspectableProcess::~InspectableProcess()
|
||||
{
|
||||
}
|
||||
|
||||
String InspectableProcess::wait_for_response()
|
||||
{
|
||||
if (m_socket->is_eof()) {
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace InspectorServer {
|
|||
class InspectableProcess {
|
||||
public:
|
||||
InspectableProcess(pid_t, NonnullOwnPtr<Core::Stream::LocalSocket>);
|
||||
~InspectableProcess();
|
||||
~InspectableProcess() = default;
|
||||
|
||||
void send_request(JsonObject const& request);
|
||||
String wait_for_response();
|
||||
|
|
|
@ -19,10 +19,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
s_connections.set(client_id, *this);
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace LaunchServer {
|
|||
class ConnectionFromClient final : public IPC::ConnectionFromClient<LaunchClientEndpoint, LaunchServerEndpoint> {
|
||||
C_OBJECT(ConnectionFromClient)
|
||||
public:
|
||||
~ConnectionFromClient() override;
|
||||
~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ class LoginWindow final : public GUI::Window {
|
|||
C_OBJECT(LoginWindow);
|
||||
|
||||
public:
|
||||
virtual ~LoginWindow() override { }
|
||||
virtual ~LoginWindow() override = default;
|
||||
|
||||
Function<void()> on_submit;
|
||||
|
||||
|
|
|
@ -19,10 +19,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
s_connections.set(client_id, *this);
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
|
|
|
@ -18,7 +18,7 @@ class ConnectionFromClient final
|
|||
C_OBJECT(ConnectionFromClient);
|
||||
|
||||
public:
|
||||
virtual ~ConnectionFromClient() override;
|
||||
virtual ~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ ByteBuffer DNSPacket::to_byte_buffer() const
|
|||
|
||||
class [[gnu::packed]] DNSRecordWithoutName {
|
||||
public:
|
||||
DNSRecordWithoutName() { }
|
||||
DNSRecordWithoutName() = default;
|
||||
|
||||
u16 type() const { return m_type; }
|
||||
u16 record_class() const { return m_class; }
|
||||
|
|
|
@ -22,7 +22,7 @@ enum class ShouldRandomizeCase {
|
|||
|
||||
class DNSPacket {
|
||||
public:
|
||||
DNSPacket() { }
|
||||
DNSPacket() = default;
|
||||
|
||||
static Optional<DNSPacket> from_raw_packet(const u8*, size_t);
|
||||
ByteBuffer to_byte_buffer() const;
|
||||
|
|
|
@ -19,10 +19,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
s_connections.set(client_id, *this);
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace NotificationServer {
|
|||
class ConnectionFromClient final : public IPC::ConnectionFromClient<NotificationClientEndpoint, NotificationServerEndpoint> {
|
||||
C_OBJECT(ConnectionFromClient)
|
||||
public:
|
||||
~ConnectionFromClient() override;
|
||||
~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -98,10 +98,6 @@ NotificationWindow::NotificationWindow(i32 client_id, const String& text, const
|
|||
};
|
||||
}
|
||||
|
||||
NotificationWindow::~NotificationWindow()
|
||||
{
|
||||
}
|
||||
|
||||
RefPtr<NotificationWindow> NotificationWindow::get_window_by_id(i32 id)
|
||||
{
|
||||
auto window = s_windows.get(id);
|
||||
|
|
|
@ -15,7 +15,7 @@ class NotificationWindow final : public GUI::Window {
|
|||
C_OBJECT(NotificationWindow);
|
||||
|
||||
public:
|
||||
virtual ~NotificationWindow() override;
|
||||
virtual ~NotificationWindow() override = default;
|
||||
void set_original_rect(Gfx::IntRect original_rect) { m_original_rect = original_rect; };
|
||||
|
||||
void set_text(const String&);
|
||||
|
|
|
@ -22,10 +22,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
s_connections.set(1, *this);
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
|
|
|
@ -19,7 +19,7 @@ class ConnectionFromClient final
|
|||
C_OBJECT(ConnectionFromClient);
|
||||
|
||||
public:
|
||||
~ConnectionFromClient() override;
|
||||
~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -17,10 +17,6 @@ GeminiProtocol::GeminiProtocol()
|
|||
{
|
||||
}
|
||||
|
||||
GeminiProtocol::~GeminiProtocol()
|
||||
{
|
||||
}
|
||||
|
||||
OwnPtr<Request> GeminiProtocol::start_request(ConnectionFromClient& client, const String&, const URL& url, const HashMap<String, String>&, ReadonlyBytes)
|
||||
{
|
||||
Gemini::GeminiRequest request;
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace RequestServer {
|
|||
class GeminiProtocol final : public Protocol {
|
||||
public:
|
||||
GeminiProtocol();
|
||||
virtual ~GeminiProtocol() override;
|
||||
virtual ~GeminiProtocol() override = default;
|
||||
|
||||
virtual OwnPtr<Request> start_request(ConnectionFromClient&, const String& method, const URL&, const HashMap<String, String>&, ReadonlyBytes body) override;
|
||||
};
|
||||
|
|
|
@ -19,10 +19,6 @@ Request::Request(ConnectionFromClient& client, NonnullOwnPtr<Core::Stream::File>
|
|||
{
|
||||
}
|
||||
|
||||
Request::~Request()
|
||||
{
|
||||
}
|
||||
|
||||
void Request::stop()
|
||||
{
|
||||
m_client.did_finish_request({}, *this, false);
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace RequestServer {
|
|||
|
||||
class Request {
|
||||
public:
|
||||
virtual ~Request();
|
||||
virtual ~Request() = default;
|
||||
|
||||
i32 id() const { return m_id; }
|
||||
virtual URL url() const = 0;
|
||||
|
|
|
@ -29,10 +29,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
s_connections.set(client_id, *this);
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
|
|
|
@ -18,7 +18,7 @@ class ConnectionFromClient final
|
|||
C_OBJECT(ConnectionFromClient);
|
||||
|
||||
public:
|
||||
virtual ~ConnectionFromClient() override;
|
||||
virtual ~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -159,10 +159,6 @@ ClockWidget::ClockWidget()
|
|||
};
|
||||
}
|
||||
|
||||
ClockWidget::~ClockWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void ClockWidget::paint_event(GUI::PaintEvent& event)
|
||||
{
|
||||
GUI::Frame::paint_event(event);
|
||||
|
|
|
@ -22,7 +22,7 @@ class ClockWidget final : public GUI::Frame {
|
|||
C_OBJECT(ClockWidget);
|
||||
|
||||
public:
|
||||
virtual ~ClockWidget() override;
|
||||
virtual ~ClockWidget() override = default;
|
||||
|
||||
private:
|
||||
ClockWidget();
|
||||
|
|
|
@ -112,10 +112,6 @@ QuickLaunchWidget::QuickLaunchWidget()
|
|||
}
|
||||
}
|
||||
|
||||
QuickLaunchWidget::~QuickLaunchWidget()
|
||||
{
|
||||
}
|
||||
|
||||
OwnPtr<QuickLaunchEntry> QuickLaunchEntry::create_from_config_value(StringView value)
|
||||
{
|
||||
if (!value.starts_with("/") && value.ends_with(".af")) {
|
||||
|
|
|
@ -78,7 +78,7 @@ class QuickLaunchWidget : public GUI::Frame
|
|||
C_OBJECT(QuickLaunchWidget);
|
||||
|
||||
public:
|
||||
virtual ~QuickLaunchWidget() override;
|
||||
virtual ~QuickLaunchWidget() override = default;
|
||||
|
||||
virtual void config_key_was_removed(String const&, String const&, String const&) override;
|
||||
virtual void config_string_did_change(String const&, String const&, String const&, String const&) override;
|
||||
|
|
|
@ -117,7 +117,3 @@ ShutdownDialog::ShutdownDialog()
|
|||
// Request WindowServer to re-update us on the current theme as we might've not been alive for the last notification.
|
||||
refresh_system_theme();
|
||||
}
|
||||
|
||||
ShutdownDialog::~ShutdownDialog()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ public:
|
|||
|
||||
private:
|
||||
ShutdownDialog();
|
||||
virtual ~ShutdownDialog() override;
|
||||
virtual ~ShutdownDialog() override = default;
|
||||
|
||||
int m_selected_option { -1 };
|
||||
};
|
||||
|
|
|
@ -19,10 +19,6 @@ TaskbarButton::TaskbarButton(const WindowIdentifier& identifier)
|
|||
{
|
||||
}
|
||||
|
||||
TaskbarButton::~TaskbarButton()
|
||||
{
|
||||
}
|
||||
|
||||
void TaskbarButton::context_menu_event(GUI::ContextMenuEvent&)
|
||||
{
|
||||
GUI::ConnectionToWindowMangerServer::the().async_popup_window_menu(
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
class TaskbarButton final : public GUI::Button {
|
||||
C_OBJECT(TaskbarButton)
|
||||
public:
|
||||
virtual ~TaskbarButton() override;
|
||||
virtual ~TaskbarButton() override = default;
|
||||
|
||||
void update_taskbar_rect();
|
||||
void clear_taskbar_rect();
|
||||
|
|
|
@ -30,10 +30,10 @@ class TaskbarWidget final : public GUI::Widget {
|
|||
C_OBJECT(TaskbarWidget);
|
||||
|
||||
public:
|
||||
virtual ~TaskbarWidget() override { }
|
||||
virtual ~TaskbarWidget() override = default;
|
||||
|
||||
private:
|
||||
TaskbarWidget() { }
|
||||
TaskbarWidget() = default;
|
||||
|
||||
virtual void paint_event(GUI::PaintEvent& event) override
|
||||
{
|
||||
|
@ -99,10 +99,6 @@ TaskbarWindow::TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu)
|
|||
m_assistant_app_file = Desktop::AppFile::open(af_path);
|
||||
}
|
||||
|
||||
TaskbarWindow::~TaskbarWindow()
|
||||
{
|
||||
}
|
||||
|
||||
void TaskbarWindow::show_desktop_button_clicked(unsigned)
|
||||
{
|
||||
GUI::ConnectionToWindowMangerServer::the().async_toggle_show_desktop();
|
||||
|
|
|
@ -18,7 +18,7 @@ class TaskbarWindow final : public GUI::Window {
|
|||
C_OBJECT(TaskbarWindow);
|
||||
|
||||
public:
|
||||
virtual ~TaskbarWindow() override;
|
||||
virtual ~TaskbarWindow() override = default;
|
||||
|
||||
static int taskbar_height() { return 27; }
|
||||
static int taskbar_icon_size() { return 16; }
|
||||
|
|
|
@ -41,10 +41,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
m_paint_flush_timer = Core::Timer::create_single_shot(0, [this] { flush_pending_paint_requests(); });
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
Core::EventLoop::current().quit(0);
|
||||
|
|
|
@ -25,7 +25,7 @@ class ConnectionFromClient final
|
|||
C_OBJECT(ConnectionFromClient);
|
||||
|
||||
public:
|
||||
~ConnectionFromClient() override;
|
||||
~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -19,10 +19,6 @@ ConsoleGlobalObject::ConsoleGlobalObject(Web::Bindings::WindowObject& parent_obj
|
|||
{
|
||||
}
|
||||
|
||||
ConsoleGlobalObject::~ConsoleGlobalObject()
|
||||
{
|
||||
}
|
||||
|
||||
void ConsoleGlobalObject::initialize_global_object()
|
||||
{
|
||||
Base::initialize_global_object();
|
||||
|
|
|
@ -21,7 +21,7 @@ class ConsoleGlobalObject final : public JS::GlobalObject {
|
|||
|
||||
public:
|
||||
ConsoleGlobalObject(Web::Bindings::WindowObject&);
|
||||
virtual ~ConsoleGlobalObject() override;
|
||||
virtual ~ConsoleGlobalObject() override = default;
|
||||
|
||||
virtual JS::ThrowCompletionOr<Object*> internal_get_prototype_of() const override;
|
||||
virtual JS::ThrowCompletionOr<bool> internal_set_prototype_of(Object* prototype) override;
|
||||
|
|
|
@ -28,10 +28,6 @@ PageHost::PageHost(ConnectionFromClient& client)
|
|||
});
|
||||
}
|
||||
|
||||
PageHost::~PageHost()
|
||||
{
|
||||
}
|
||||
|
||||
void PageHost::set_has_focus(bool has_focus)
|
||||
{
|
||||
m_has_focus = has_focus;
|
||||
|
|
|
@ -19,7 +19,7 @@ class PageHost final : public Web::PageClient {
|
|||
|
||||
public:
|
||||
static NonnullOwnPtr<PageHost> create(ConnectionFromClient& client) { return adopt_own(*new PageHost(client)); }
|
||||
virtual ~PageHost();
|
||||
virtual ~PageHost() = default;
|
||||
|
||||
Web::Page& page() { return *m_page; }
|
||||
const Web::Page& page() const { return *m_page; }
|
||||
|
|
|
@ -19,10 +19,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
|
|||
s_connections.set(1, *this);
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient()
|
||||
{
|
||||
}
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
|
|
|
@ -19,7 +19,7 @@ class ConnectionFromClient final
|
|||
C_OBJECT(ConnectionFromClient);
|
||||
|
||||
public:
|
||||
~ConnectionFromClient() override;
|
||||
~ConnectionFromClient() override = default;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
|
|
@ -25,10 +25,6 @@ AppletManager::AppletManager()
|
|||
order_vector = order.split(',');
|
||||
}
|
||||
|
||||
AppletManager::~AppletManager()
|
||||
{
|
||||
}
|
||||
|
||||
AppletManager& AppletManager::the()
|
||||
{
|
||||
VERIFY(s_the);
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace WindowServer {
|
|||
class AppletManager : public Core::Object {
|
||||
C_OBJECT(AppletManager)
|
||||
public:
|
||||
~AppletManager();
|
||||
~AppletManager() = default;
|
||||
|
||||
static AppletManager& the();
|
||||
|
||||
|
|
|
@ -20,9 +20,7 @@ Button::Button(WindowFrame& frame, Function<void(Button&)>&& on_click_handler)
|
|||
{
|
||||
}
|
||||
|
||||
Button::~Button()
|
||||
{
|
||||
}
|
||||
Button::~Button() = default;
|
||||
|
||||
void Button::paint(Screen& screen, Gfx::Painter& painter)
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
Gfx::IntSize size() const { return m_rect.size(); }
|
||||
|
||||
private:
|
||||
Cursor() { }
|
||||
Cursor() = default;
|
||||
Cursor(NonnullRefPtr<Gfx::Bitmap>&&, int, const Gfx::CursorParams&);
|
||||
|
||||
bool load(StringView, StringView);
|
||||
|
|
|
@ -37,12 +37,12 @@ public:
|
|||
WindowResized,
|
||||
};
|
||||
|
||||
Event() { }
|
||||
Event() = default;
|
||||
explicit Event(Type type)
|
||||
: Core::Event(type)
|
||||
{
|
||||
}
|
||||
virtual ~Event() { }
|
||||
virtual ~Event() = default;
|
||||
|
||||
bool is_mouse_event() const { return type() == MouseMove || type() == MouseDown || type() == MouseDoubleClick || type() == MouseUp || type() == MouseWheel; }
|
||||
bool is_key_event() const { return type() == KeyUp || type() == KeyDown; }
|
||||
|
|
|
@ -41,10 +41,6 @@ EventLoop::EventLoop()
|
|||
}
|
||||
}
|
||||
|
||||
EventLoop::~EventLoop()
|
||||
{
|
||||
}
|
||||
|
||||
void EventLoop::drain_mouse()
|
||||
{
|
||||
auto& screen_input = ScreenInput::the();
|
||||
|
|
|
@ -20,7 +20,7 @@ class ConnectionFromClient;
|
|||
class EventLoop {
|
||||
public:
|
||||
EventLoop();
|
||||
virtual ~EventLoop();
|
||||
virtual ~EventLoop() = default;
|
||||
|
||||
int exec() { return m_event_loop.exec(); }
|
||||
|
||||
|
|
|
@ -26,10 +26,6 @@ KeymapSwitcher::KeymapSwitcher()
|
|||
refresh();
|
||||
}
|
||||
|
||||
KeymapSwitcher::~KeymapSwitcher()
|
||||
{
|
||||
}
|
||||
|
||||
void KeymapSwitcher::refresh()
|
||||
{
|
||||
m_keymaps.clear();
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace WindowServer {
|
|||
class KeymapSwitcher final : public Core::Object {
|
||||
C_OBJECT(KeymapSwitcher)
|
||||
public:
|
||||
virtual ~KeymapSwitcher() override;
|
||||
virtual ~KeymapSwitcher() override = default;
|
||||
|
||||
void next_keymap();
|
||||
|
||||
|
|
|
@ -47,10 +47,6 @@ Menu::Menu(ConnectionFromClient* client, int menu_id, String name)
|
|||
m_alt_shortcut_character = find_ampersand_shortcut_character(m_name);
|
||||
}
|
||||
|
||||
Menu::~Menu()
|
||||
{
|
||||
}
|
||||
|
||||
const Gfx::Font& Menu::font() const
|
||||
{
|
||||
return Gfx::FontDatabase::default_font();
|
||||
|
|
|
@ -28,7 +28,7 @@ class Menu final : public Core::Object {
|
|||
C_OBJECT(Menu);
|
||||
|
||||
public:
|
||||
virtual ~Menu() override;
|
||||
virtual ~Menu() override = default;
|
||||
|
||||
ConnectionFromClient* client() { return m_client; }
|
||||
const ConnectionFromClient* client() const { return m_client; }
|
||||
|
|
|
@ -31,10 +31,6 @@ MenuItem::MenuItem(Menu& menu, Type type)
|
|||
{
|
||||
}
|
||||
|
||||
MenuItem::~MenuItem()
|
||||
{
|
||||
}
|
||||
|
||||
void MenuItem::set_enabled(bool enabled)
|
||||
{
|
||||
if (m_enabled == enabled)
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
|
||||
MenuItem(Menu&, unsigned identifier, const String& text, const String& shortcut_text = {}, bool enabled = true, bool checkable = false, bool checked = false, const Gfx::Bitmap* icon = nullptr);
|
||||
MenuItem(Menu&, Type);
|
||||
~MenuItem();
|
||||
~MenuItem() = default;
|
||||
|
||||
Type type() const { return m_type; }
|
||||
|
||||
|
|
|
@ -26,10 +26,6 @@ MenuManager::MenuManager()
|
|||
s_the = this;
|
||||
}
|
||||
|
||||
MenuManager::~MenuManager()
|
||||
{
|
||||
}
|
||||
|
||||
bool MenuManager::is_open(const Menu& menu) const
|
||||
{
|
||||
for (size_t i = 0; i < m_open_menu_stack.size(); ++i) {
|
||||
|
|
|
@ -20,7 +20,7 @@ class MenuManager final : public Core::Object {
|
|||
public:
|
||||
static MenuManager& the();
|
||||
|
||||
virtual ~MenuManager() override;
|
||||
virtual ~MenuManager() override = default;
|
||||
|
||||
bool is_open(const Menu&) const;
|
||||
bool has_open_menu() const { return !m_open_menu_stack.is_empty(); }
|
||||
|
|
|
@ -112,9 +112,7 @@ void WindowFrame::window_was_constructed(Badge<Window>)
|
|||
m_has_alpha_channel = Gfx::WindowTheme::current().frame_uses_alpha(window_state_for_theme(), WindowManager::the().palette());
|
||||
}
|
||||
|
||||
WindowFrame::~WindowFrame()
|
||||
{
|
||||
}
|
||||
WindowFrame::~WindowFrame() = default;
|
||||
|
||||
void WindowFrame::set_button_icons()
|
||||
{
|
||||
|
|
|
@ -68,10 +68,6 @@ WindowManager::WindowManager(Gfx::PaletteImpl const& palette)
|
|||
Compositor::the().did_construct_window_manager({});
|
||||
}
|
||||
|
||||
WindowManager::~WindowManager()
|
||||
{
|
||||
}
|
||||
|
||||
void WindowManager::reload_config()
|
||||
{
|
||||
m_config = Core::ConfigFile::open("/etc/WindowServer.ini", Core::ConfigFile::AllowWriting::Yes).release_value_but_fixme_should_propagate_errors();
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
|
||||
static WindowManager& the();
|
||||
|
||||
virtual ~WindowManager() override;
|
||||
virtual ~WindowManager() override = default;
|
||||
|
||||
Palette palette() const { return Palette(*m_palette); }
|
||||
|
||||
|
|
|
@ -15,10 +15,6 @@ WindowStack::WindowStack(unsigned row, unsigned column)
|
|||
{
|
||||
}
|
||||
|
||||
WindowStack::~WindowStack()
|
||||
{
|
||||
}
|
||||
|
||||
void WindowStack::add(Window& window)
|
||||
{
|
||||
VERIFY(!window.is_on_any_window_stack({}));
|
||||
|
|
|
@ -16,7 +16,7 @@ class Compositor;
|
|||
class WindowStack {
|
||||
public:
|
||||
WindowStack(unsigned row, unsigned column);
|
||||
~WindowStack();
|
||||
~WindowStack() = default;
|
||||
|
||||
bool is_empty() const { return m_windows.is_empty(); }
|
||||
void add(Window&);
|
||||
|
|
|
@ -28,10 +28,6 @@ WindowSwitcher::WindowSwitcher()
|
|||
s_the = this;
|
||||
}
|
||||
|
||||
WindowSwitcher::~WindowSwitcher()
|
||||
{
|
||||
}
|
||||
|
||||
void WindowSwitcher::set_visible(bool visible)
|
||||
{
|
||||
if (m_visible == visible)
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
};
|
||||
static WindowSwitcher& the();
|
||||
|
||||
virtual ~WindowSwitcher() override;
|
||||
virtual ~WindowSwitcher() override = default;
|
||||
|
||||
bool is_visible() const { return m_visible; }
|
||||
void set_visible(bool);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue