diff options
author | Lenny Maiorani <lenny@serenityos.org> | 2022-02-15 13:28:01 -0700 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-02-16 07:33:15 -0500 |
commit | 7070713ec82675cd8ac0c6a86e6259d3543f60c4 (patch) | |
tree | a4b880f0d4a14a65aa8aaabc64717eb059c75adc /Userland/DevTools/HackStudio/LanguageServers | |
parent | 84f87a9f76ac3eb96bc0c777a6437de3cf19c8ee (diff) | |
download | serenity-7070713ec82675cd8ac0c6a86e6259d3543f60c4.zip |
DevTools: 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/DevTools/HackStudio/LanguageServers')
4 files changed, 6 insertions, 9 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageServers/ClientConnection.cpp b/Userland/DevTools/HackStudio/LanguageServers/ClientConnection.cpp index 30cd662e89..03edcb14ee 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/ClientConnection.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/ClientConnection.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -20,10 +21,6 @@ ClientConnection::ClientConnection(NonnullOwnPtr<Core::Stream::LocalSocket> sock s_connections.set(1, *this); } -ClientConnection::~ClientConnection() -{ -} - void ClientConnection::die() { s_connections.remove(client_id()); diff --git a/Userland/DevTools/HackStudio/LanguageServers/ClientConnection.h b/Userland/DevTools/HackStudio/LanguageServers/ClientConnection.h index 8ec97fbfb7..fc848b2fbb 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/ClientConnection.h +++ b/Userland/DevTools/HackStudio/LanguageServers/ClientConnection.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -21,7 +22,7 @@ namespace LanguageServers { class ClientConnection : public IPC::ClientConnection<LanguageClientEndpoint, LanguageServerEndpoint> { public: explicit ClientConnection(NonnullOwnPtr<Core::Stream::LocalSocket>); - ~ClientConnection() override; + ~ClientConnection() override = default; virtual void die() override; diff --git a/Userland/DevTools/HackStudio/LanguageServers/CodeComprehensionEngine.cpp b/Userland/DevTools/HackStudio/LanguageServers/CodeComprehensionEngine.cpp index 361ffd392d..044aae97ab 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/CodeComprehensionEngine.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/CodeComprehensionEngine.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Itamar S. <itamar8910@gmail.com> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -14,9 +15,6 @@ CodeComprehensionEngine::CodeComprehensionEngine(const FileDB& filedb, bool shou { } -CodeComprehensionEngine::~CodeComprehensionEngine() -{ -} void CodeComprehensionEngine::set_declarations_of_document(const String& filename, Vector<GUI::AutocompleteProvider::Declaration>&& declarations) { // Callback may not be configured if we're running tests diff --git a/Userland/DevTools/HackStudio/LanguageServers/CodeComprehensionEngine.h b/Userland/DevTools/HackStudio/LanguageServers/CodeComprehensionEngine.h index 13a19c3d85..da410b4638 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/CodeComprehensionEngine.h +++ b/Userland/DevTools/HackStudio/LanguageServers/CodeComprehensionEngine.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Itamar S. <itamar8910@gmail.com> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -18,7 +19,7 @@ class ClientConnection; class CodeComprehensionEngine { public: CodeComprehensionEngine(const FileDB& filedb, bool store_all_declarations = false); - virtual ~CodeComprehensionEngine(); + virtual ~CodeComprehensionEngine() = default; virtual Vector<GUI::AutocompleteProvider::Entry> get_suggestions(const String& file, const GUI::TextPosition& autocomplete_position) = 0; |