diff options
author | Lenny Maiorani <lenny@serenityos.org> | 2022-03-04 13:19:54 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-13 22:34:38 +0100 |
commit | 103ce2f9e921b5fd4624277f724a3b2aaf3ae53b (patch) | |
tree | 79b7a5346a375c05d4ff4394ba9c22c836821529 | |
parent | dcdc62323dc0d17f5b6959bfeb78645e0e35840c (diff) | |
download | serenity-103ce2f9e921b5fd4624277f724a3b2aaf3ae53b.zip |
Libraries: Use default constructors/destructors in LibLine
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."
-rw-r--r-- | Userland/Libraries/LibLine/Style.h | 6 | ||||
-rw-r--r-- | Userland/Libraries/LibLine/SuggestionDisplay.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibLine/Style.h b/Userland/Libraries/LibLine/Style.h index d1f42805cf..dbed87e13b 100644 --- a/Userland/Libraries/LibLine/Style.h +++ b/Userland/Libraries/LibLine/Style.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, the SerenityOS developers. + * Copyright (c) 2020-2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -96,7 +96,7 @@ public: m_has_link = true; } - Hyperlink() { } + Hyperlink() = default; String to_vt_escape(bool starting) const; @@ -119,7 +119,7 @@ public: set(style_arg); m_is_empty = false; } - Style() { } + Style() = default; static Style reset_style() { diff --git a/Userland/Libraries/LibLine/SuggestionDisplay.h b/Userland/Libraries/LibLine/SuggestionDisplay.h index 03d405d659..fab70d7b82 100644 --- a/Userland/Libraries/LibLine/SuggestionDisplay.h +++ b/Userland/Libraries/LibLine/SuggestionDisplay.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, the SerenityOS developers. + * Copyright (c) 2020-2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -18,7 +18,7 @@ class Editor; class SuggestionDisplay { public: - virtual ~SuggestionDisplay() { } + virtual ~SuggestionDisplay() = default; virtual void display(SuggestionManager const&) = 0; virtual bool cleanup() = 0; virtual void finish() = 0; @@ -62,7 +62,7 @@ public: , m_num_columns(columns) { } - virtual ~XtermSuggestionDisplay() override { } + virtual ~XtermSuggestionDisplay() override = default; virtual void display(SuggestionManager const&) override; virtual bool cleanup() override; virtual void finish() override |