diff options
author | Lenny Maiorani <lenny@serenityos.org> | 2022-03-23 20:58:03 -0600 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-03-24 20:09:26 -0700 |
commit | 0b7baa7e5a556f82988ad4f6b39fed8cd38ae9fd (patch) | |
tree | 85342dfcc6110883cf5865abe3f4bdae0f308173 /Userland/Services/InspectorServer | |
parent | 5550905c00c097b92eb5832fc92b88a00018620b (diff) | |
download | serenity-0b7baa7e5a556f82988ad4f6b39fed8cd38ae9fd.zip |
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."
Diffstat (limited to 'Userland/Services/InspectorServer')
4 files changed, 2 insertions, 10 deletions
diff --git a/Userland/Services/InspectorServer/ConnectionFromClient.cpp b/Userland/Services/InspectorServer/ConnectionFromClient.cpp index db51a87729..c8204cc804 100644 --- a/Userland/Services/InspectorServer/ConnectionFromClient.cpp +++ b/Userland/Services/InspectorServer/ConnectionFromClient.cpp @@ -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()); diff --git a/Userland/Services/InspectorServer/ConnectionFromClient.h b/Userland/Services/InspectorServer/ConnectionFromClient.h index c279dcd311..f68b5dac75 100644 --- a/Userland/Services/InspectorServer/ConnectionFromClient.h +++ b/Userland/Services/InspectorServer/ConnectionFromClient.h @@ -18,7 +18,7 @@ class ConnectionFromClient final C_OBJECT(ConnectionFromClient); public: - ~ConnectionFromClient() override; + ~ConnectionFromClient() override = default; virtual void die() override; diff --git a/Userland/Services/InspectorServer/InspectableProcess.cpp b/Userland/Services/InspectorServer/InspectableProcess.cpp index cfd104703f..cf896b0644 100644 --- a/Userland/Services/InspectorServer/InspectableProcess.cpp +++ b/Userland/Services/InspectorServer/InspectableProcess.cpp @@ -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()) { diff --git a/Userland/Services/InspectorServer/InspectableProcess.h b/Userland/Services/InspectorServer/InspectableProcess.h index ed1547cce0..bdd61e712a 100644 --- a/Userland/Services/InspectorServer/InspectableProcess.h +++ b/Userland/Services/InspectorServer/InspectableProcess.h @@ -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(); |