mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
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."
This commit is contained in:
parent
8b334248e4
commit
1a59cffb00
Notes:
sideshowbarker
2024-07-17 17:28:48 +09:00
Author: https://github.com/ldm5180 Commit: https://github.com/SerenityOS/serenity/commit/1a59cffb00 Pull-request: https://github.com/SerenityOS/serenity/pull/13017
@ -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);
|
||||
|
@ -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&);
|
||||
|
@ -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);
|
||||
|
@ -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(); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user