summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/GML
diff options
context:
space:
mode:
authorLenny Maiorani <lenny@serenityos.org>2022-02-26 10:50:04 -0700
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-03-12 14:44:43 -0800
commitfe3b846ac825d8d91923cb1407dcecf66f29513e (patch)
tree86f3e8976bb1a57c9b2818b7a71b228cc708359f /Userland/Libraries/LibGUI/GML
parentb801ddf73d605dd80b5033c3eae3125ec2ffc4bb (diff)
downloadserenity-fe3b846ac825d8d91923cb1407dcecf66f29513e.zip
Libraries: Use default constructors/destructors in LibGUI
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/LibGUI/GML')
-rw-r--r--Userland/Libraries/LibGUI/GML/AutocompleteProvider.h5
-rw-r--r--Userland/Libraries/LibGUI/GML/SyntaxHighlighter.cpp5
-rw-r--r--Userland/Libraries/LibGUI/GML/SyntaxHighlighter.h5
3 files changed, 7 insertions, 8 deletions
diff --git a/Userland/Libraries/LibGUI/GML/AutocompleteProvider.h b/Userland/Libraries/LibGUI/GML/AutocompleteProvider.h
index 98dfe35a07..f3008b8517 100644
--- a/Userland/Libraries/LibGUI/GML/AutocompleteProvider.h
+++ b/Userland/Libraries/LibGUI/GML/AutocompleteProvider.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -12,8 +13,8 @@ namespace GUI::GML {
class AutocompleteProvider final : public virtual GUI::AutocompleteProvider {
public:
- AutocompleteProvider() { }
- virtual ~AutocompleteProvider() override { }
+ AutocompleteProvider() = default;
+ virtual ~AutocompleteProvider() override = default;
private:
static bool can_have_declared_layout(StringView class_name)
diff --git a/Userland/Libraries/LibGUI/GML/SyntaxHighlighter.cpp b/Userland/Libraries/LibGUI/GML/SyntaxHighlighter.cpp
index 4a6e3f3344..41c9de0446 100644
--- a/Userland/Libraries/LibGUI/GML/SyntaxHighlighter.cpp
+++ b/Userland/Libraries/LibGUI/GML/SyntaxHighlighter.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -77,8 +78,4 @@ bool SyntaxHighlighter::token_types_equal(u64 token1, u64 token2) const
return static_cast<Token::Type>(token1) == static_cast<Token::Type>(token2);
}
-SyntaxHighlighter::~SyntaxHighlighter()
-{
-}
-
}
diff --git a/Userland/Libraries/LibGUI/GML/SyntaxHighlighter.h b/Userland/Libraries/LibGUI/GML/SyntaxHighlighter.h
index 5b52bdacf2..0c2961e90a 100644
--- a/Userland/Libraries/LibGUI/GML/SyntaxHighlighter.h
+++ b/Userland/Libraries/LibGUI/GML/SyntaxHighlighter.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -12,8 +13,8 @@ namespace GUI::GML {
class SyntaxHighlighter final : public Syntax::Highlighter {
public:
- SyntaxHighlighter() { }
- virtual ~SyntaxHighlighter() override;
+ SyntaxHighlighter() = default;
+ virtual ~SyntaxHighlighter() override = default;
virtual bool is_identifier(u64) const override;