mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -12,7 +12,7 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
const char* to_string(Variant::Type type)
|
||||
char const* to_string(Variant::Type type)
|
||||
{
|
||||
switch (type) {
|
||||
case Variant::Type::Invalid:
|
||||
|
@ -162,12 +162,12 @@ Variant::Variant(bool value)
|
|||
m_value.as_bool = value;
|
||||
}
|
||||
|
||||
Variant::Variant(const char* cstring)
|
||||
Variant::Variant(char const* cstring)
|
||||
: Variant(String(cstring))
|
||||
{
|
||||
}
|
||||
|
||||
Variant::Variant(const FlyString& value)
|
||||
Variant::Variant(FlyString const& value)
|
||||
: Variant(String(value.impl()))
|
||||
{
|
||||
}
|
||||
|
@ -177,14 +177,14 @@ Variant::Variant(StringView value)
|
|||
{
|
||||
}
|
||||
|
||||
Variant::Variant(const String& value)
|
||||
Variant::Variant(String const& value)
|
||||
: m_type(Type::String)
|
||||
{
|
||||
m_value.as_string = const_cast<StringImpl*>(value.impl());
|
||||
AK::ref_if_not_null(m_value.as_string);
|
||||
}
|
||||
|
||||
Variant::Variant(const JsonValue& value)
|
||||
Variant::Variant(JsonValue const& value)
|
||||
{
|
||||
if (value.is_null()) {
|
||||
m_value.as_string = nullptr;
|
||||
|
@ -231,7 +231,7 @@ Variant::Variant(const JsonValue& value)
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
Variant::Variant(const Gfx::Bitmap& value)
|
||||
Variant::Variant(Gfx::Bitmap const& value)
|
||||
: m_type(Type::Bitmap)
|
||||
{
|
||||
m_value.as_bitmap = const_cast<Gfx::Bitmap*>(&value);
|
||||
|
@ -245,7 +245,7 @@ Variant::Variant(const GUI::Icon& value)
|
|||
AK::ref_if_not_null(m_value.as_icon);
|
||||
}
|
||||
|
||||
Variant::Variant(const Gfx::Font& value)
|
||||
Variant::Variant(Gfx::Font const& value)
|
||||
: m_type(Type::Font)
|
||||
{
|
||||
m_value.as_font = &const_cast<Gfx::Font&>(value);
|
||||
|
@ -258,25 +258,25 @@ Variant::Variant(Color color)
|
|||
m_value.as_color = color.value();
|
||||
}
|
||||
|
||||
Variant::Variant(const Gfx::IntPoint& point)
|
||||
Variant::Variant(Gfx::IntPoint const& point)
|
||||
: m_type(Type::Point)
|
||||
{
|
||||
m_value.as_point = { point.x(), point.y() };
|
||||
}
|
||||
|
||||
Variant::Variant(const Gfx::IntSize& size)
|
||||
Variant::Variant(Gfx::IntSize const& size)
|
||||
: m_type(Type::Size)
|
||||
{
|
||||
m_value.as_size = { size.width(), size.height() };
|
||||
}
|
||||
|
||||
Variant::Variant(const Gfx::IntRect& rect)
|
||||
Variant::Variant(Gfx::IntRect const& rect)
|
||||
: m_type(Type::Rect)
|
||||
{
|
||||
m_value.as_rect = (const RawRect&)rect;
|
||||
m_value.as_rect = (RawRect const&)rect;
|
||||
}
|
||||
|
||||
Variant& Variant::operator=(const Variant& other)
|
||||
Variant& Variant::operator=(Variant const& other)
|
||||
{
|
||||
if (&other == this)
|
||||
return *this;
|
||||
|
@ -294,7 +294,7 @@ Variant& Variant::operator=(Variant&& other)
|
|||
return *this;
|
||||
}
|
||||
|
||||
Variant::Variant(const Variant& other)
|
||||
Variant::Variant(Variant const& other)
|
||||
{
|
||||
copy_from(other);
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ void Variant::move_from(Variant&& other)
|
|||
other.m_value.as_string = nullptr;
|
||||
}
|
||||
|
||||
void Variant::copy_from(const Variant& other)
|
||||
void Variant::copy_from(Variant const& other)
|
||||
{
|
||||
VERIFY(!is_valid());
|
||||
m_type = other.m_type;
|
||||
|
@ -381,7 +381,7 @@ void Variant::copy_from(const Variant& other)
|
|||
}
|
||||
}
|
||||
|
||||
bool Variant::operator==(const Variant& other) const
|
||||
bool Variant::operator==(Variant const& other) const
|
||||
{
|
||||
if (m_type != other.m_type)
|
||||
return to_string() == other.to_string();
|
||||
|
@ -432,7 +432,7 @@ bool Variant::operator==(const Variant& other) const
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
bool Variant::operator<(const Variant& other) const
|
||||
bool Variant::operator<(Variant const& other) const
|
||||
{
|
||||
if (m_type != other.m_type)
|
||||
return to_string() < other.to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue