diff options
author | Lenny Maiorani <lenny@serenityos.org> | 2022-03-14 13:21:51 -0600 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-03-17 17:23:49 +0000 |
commit | c37820b898cdb9689debd28f9c66c70a16d3c663 (patch) | |
tree | c376e1fadc791bf1c651da4ba0ea1411ac046581 /Userland/Libraries/LibWeb/HTML/Parser | |
parent | c0dd188c4defcba2dcae1b14510d494331134e90 (diff) | |
download | serenity-c37820b898cdb9689debd28f9c66c70a16d3c663.zip |
Libraries: Use default constructors/destructors in LibWeb
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/LibWeb/HTML/Parser')
4 files changed, 4 insertions, 8 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.cpp b/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.cpp index 06f4b5d2a2..4261117e60 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.cpp @@ -9,9 +9,7 @@ namespace Web::HTML { -ListOfActiveFormattingElements::~ListOfActiveFormattingElements() -{ -} +ListOfActiveFormattingElements::~ListOfActiveFormattingElements() = default; void ListOfActiveFormattingElements::add(DOM::Element& element) { diff --git a/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.h b/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.h index 3a8e06593b..15fc533d73 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.h @@ -14,7 +14,7 @@ namespace Web::HTML { class ListOfActiveFormattingElements { public: - ListOfActiveFormattingElements() { } + ListOfActiveFormattingElements() = default; ~ListOfActiveFormattingElements(); struct Entry { diff --git a/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp b/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp index 97fd3d6463..35027eb81f 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp @@ -12,9 +12,7 @@ namespace Web::HTML { static Vector<FlyString> s_base_list { "applet", "caption", "html", "table", "td", "th", "marquee", "object", "template" }; -StackOfOpenElements::~StackOfOpenElements() -{ -} +StackOfOpenElements::~StackOfOpenElements() = default; bool StackOfOpenElements::has_in_scope_impl(const FlyString& tag_name, const Vector<FlyString>& list) const { diff --git a/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h b/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h index 324a89025a..4c456f1b58 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h @@ -20,7 +20,7 @@ public: // and the bottommost node of the stack is the most recently added node in the stack // (notwithstanding when the stack is manipulated in a random access fashion as part of the handling for misnested tags). - StackOfOpenElements() { } + StackOfOpenElements() = default; ~StackOfOpenElements(); DOM::Element& first() { return m_elements.first(); } |