summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWebSocket
diff options
context:
space:
mode:
authorLenny Maiorani <lenny@serenityos.org>2022-03-04 14:08:30 -0700
committerAndreas Kling <kling@serenityos.org>2022-03-13 22:34:38 +0100
commit1a59cffb003c678ed2c6042a653104b3899e97c4 (patch)
tree49b9d88089bd8ff06fc63cdce635a02a2480918f /Userland/Libraries/LibWebSocket
parent8b334248e474d939ea8bf00fa9c57f9eabcd3bd4 (diff)
downloadserenity-1a59cffb003c678ed2c6042a653104b3899e97c4.zip
Libraries: Use default constructors/destructors in LibWebSocket
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/Libraries/LibWebSocket')
-rw-r--r--Userland/Libraries/LibWebSocket/Impl/WebSocketImpl.cpp5
-rw-r--r--Userland/Libraries/LibWebSocket/Impl/WebSocketImpl.h3
-rw-r--r--Userland/Libraries/LibWebSocket/WebSocket.cpp5
-rw-r--r--Userland/Libraries/LibWebSocket/WebSocket.h3
4 files changed, 6 insertions, 10 deletions
diff --git a/Userland/Libraries/LibWebSocket/Impl/WebSocketImpl.cpp b/Userland/Libraries/LibWebSocket/Impl/WebSocketImpl.cpp
index 762177aeaa..552e0d9dd0 100644
--- a/Userland/Libraries/LibWebSocket/Impl/WebSocketImpl.cpp
+++ b/Userland/Libraries/LibWebSocket/Impl/WebSocketImpl.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2021, Dex♪ <dexes.ttp@gmail.com>
* Copyright (c) 2022, Ali Mohammad Pur <mpfard@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -14,10 +15,6 @@ WebSocketImpl::WebSocketImpl(Core::Object* parent)
{
}
-WebSocketImpl::~WebSocketImpl()
-{
-}
-
void WebSocketImpl::connect(ConnectionInfo const& connection_info)
{
VERIFY(!m_socket);
diff --git a/Userland/Libraries/LibWebSocket/Impl/WebSocketImpl.h b/Userland/Libraries/LibWebSocket/Impl/WebSocketImpl.h
index 78f349e247..f572eaa82c 100644
--- a/Userland/Libraries/LibWebSocket/Impl/WebSocketImpl.h
+++ b/Userland/Libraries/LibWebSocket/Impl/WebSocketImpl.h
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2021, Dex♪ <dexes.ttp@gmail.com>
* Copyright (c) 2022, Ali Mohammad Pur <mpfard@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -19,7 +20,7 @@ class WebSocketImpl : public Core::Object {
C_OBJECT(WebSocketImpl);
public:
- virtual ~WebSocketImpl() override;
+ virtual ~WebSocketImpl() override = default;
explicit WebSocketImpl(Core::Object* parent = nullptr);
void connect(ConnectionInfo const&);
diff --git a/Userland/Libraries/LibWebSocket/WebSocket.cpp b/Userland/Libraries/LibWebSocket/WebSocket.cpp
index 16f557644c..3aa12da472 100644
--- a/Userland/Libraries/LibWebSocket/WebSocket.cpp
+++ b/Userland/Libraries/LibWebSocket/WebSocket.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Dex♪ <dexes.ttp@gmail.com>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -25,10 +26,6 @@ WebSocket::WebSocket(ConnectionInfo connection)
{
}
-WebSocket::~WebSocket()
-{
-}
-
void WebSocket::start()
{
VERIFY(m_state == WebSocket::InternalState::NotStarted);
diff --git a/Userland/Libraries/LibWebSocket/WebSocket.h b/Userland/Libraries/LibWebSocket/WebSocket.h
index 75b778f04a..72fab05603 100644
--- a/Userland/Libraries/LibWebSocket/WebSocket.h
+++ b/Userland/Libraries/LibWebSocket/WebSocket.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Dex♪ <dexes.ttp@gmail.com>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -25,7 +26,7 @@ class WebSocket final : public Core::Object {
C_OBJECT(WebSocket)
public:
static NonnullRefPtr<WebSocket> create(ConnectionInfo);
- virtual ~WebSocket() override;
+ virtual ~WebSocket() override = default;
URL const& url() const { return m_connection.url(); }