summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Variant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibGUI/Variant.cpp')
-rw-r--r--Userland/Libraries/LibGUI/Variant.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/Userland/Libraries/LibGUI/Variant.cpp b/Userland/Libraries/LibGUI/Variant.cpp
index a519a92354..8649705b07 100644
--- a/Userland/Libraries/LibGUI/Variant.cpp
+++ b/Userland/Libraries/LibGUI/Variant.cpp
@@ -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();