summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLenny Maiorani <lenny@serenityos.org>2022-02-26 09:06:06 -0700
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-03-10 18:04:26 -0800
commit7030a9b496fddf0c64ee456672deac0014e553e0 (patch)
tree94471f438b01ddbaabb1c3aa70d41e79b3a7e1d8 /Userland/Libraries
parent11b28c88fc9cf7a05c2ec27ba39f3dbfad76b492 (diff)
downloadserenity-7030a9b496fddf0c64ee456672deac0014e553e0.zip
Libraries: Use default constructors/destructors in LibChess
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')
-rw-r--r--Userland/Libraries/LibChess/UCICommand.h4
-rw-r--r--Userland/Libraries/LibChess/UCIEndpoint.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibChess/UCICommand.h b/Userland/Libraries/LibChess/UCICommand.h
index a72b78025c..33415ae8c5 100644
--- a/Userland/Libraries/LibChess/UCICommand.h
+++ b/Userland/Libraries/LibChess/UCICommand.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, the SerenityOS developers.
+ * Copyright (c) 2020-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -46,7 +46,7 @@ public:
virtual String to_string() const = 0;
- virtual ~Command() { }
+ virtual ~Command() = default;
};
class UCICommand : public Command {
diff --git a/Userland/Libraries/LibChess/UCIEndpoint.h b/Userland/Libraries/LibChess/UCIEndpoint.h
index 430d8edcfc..f9843ae8cf 100644
--- a/Userland/Libraries/LibChess/UCIEndpoint.h
+++ b/Userland/Libraries/LibChess/UCIEndpoint.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, the SerenityOS developers.
+ * Copyright (c) 2020-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -16,7 +16,7 @@ namespace Chess::UCI {
class Endpoint : public Core::Object {
C_OBJECT(Endpoint)
public:
- virtual ~Endpoint() override { }
+ virtual ~Endpoint() override = default;
virtual void handle_uci() { }
virtual void handle_debug(const DebugCommand&) { }
@@ -46,7 +46,7 @@ public:
void set_out(RefPtr<Core::IODevice> out) { m_out = out; }
protected:
- Endpoint() { }
+ Endpoint() = default;
Endpoint(NonnullRefPtr<Core::IODevice> in, NonnullRefPtr<Core::IODevice> out);
private: