From 0b7baa7e5a556f82988ad4f6b39fed8cd38ae9fd Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Wed, 23 Mar 2022 20:58:03 -0600 Subject: 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." --- Userland/Services/Clipboard/ConnectionFromClient.cpp | 4 ---- Userland/Services/Clipboard/ConnectionFromClient.h | 2 +- Userland/Services/Clipboard/Storage.cpp | 8 -------- Userland/Services/Clipboard/Storage.h | 4 ++-- 4 files changed, 3 insertions(+), 15 deletions(-) (limited to 'Userland/Services/Clipboard') diff --git a/Userland/Services/Clipboard/ConnectionFromClient.cpp b/Userland/Services/Clipboard/ConnectionFromClient.cpp index 9a26642357..f152b609b0 100644 --- a/Userland/Services/Clipboard/ConnectionFromClient.cpp +++ b/Userland/Services/Clipboard/ConnectionFromClient.cpp @@ -25,10 +25,6 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr& metadata) { m_buffer = move(data); diff --git a/Userland/Services/Clipboard/Storage.h b/Userland/Services/Clipboard/Storage.h index 204fac61c9..07cfb46bf4 100644 --- a/Userland/Services/Clipboard/Storage.h +++ b/Userland/Services/Clipboard/Storage.h @@ -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; -- cgit v1.2.3