1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:37:45 +00:00

Libraries: Use default constructors/destructors in LibGemini

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."
This commit is contained in:
Lenny Maiorani 2022-02-26 10:55:15 -07:00 committed by Andreas Kling
parent c1e6fc67a1
commit 97fcbdd199
8 changed files with 19 additions and 59 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, the SerenityOS developers.
* Copyright (c) 2020-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -17,19 +17,11 @@ String Text::render_to_html() const
return builder.build();
}
Text::~Text()
{
}
String Heading::render_to_html() const
{
return String::formatted("<h{}>{}</h{}>", m_level, escape_html_entities(m_text.substring_view(m_level, m_text.length() - m_level)), m_level);
}
Heading::~Heading()
{
}
String UnorderedList::render_to_html() const
{
// 1.3.5.4.2 "Advanced clients can take the space of the bullet symbol into account"
@ -41,9 +33,6 @@ String UnorderedList::render_to_html() const
builder.append("</li>");
return builder.build();
}
UnorderedList::~UnorderedList()
{
}
String Control::render_to_html() const
{
@ -62,9 +51,6 @@ String Control::render_to_html() const
return "";
}
}
Control::~Control()
{
}
Link::Link(String text, const Document& document)
: Line(move(text))
@ -86,9 +72,6 @@ Link::Link(String text, const Document& document)
if (m_name.is_null())
m_name = m_url.to_string();
}
Link::~Link()
{
}
String Link::render_to_html() const
{
@ -109,12 +92,5 @@ String Preformatted::render_to_html() const
return builder.build();
}
Preformatted::~Preformatted()
{
}
Line::~Line()
{
}
}