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

LibWeb: Add operator== to CSS::Number

This will be needed for the .equals() function of the backdrop-filter
style value.
This commit is contained in:
MacDue 2022-09-15 08:31:12 +01:00 committed by Sam Atkins
parent 84d9a226e6
commit 776538a6c4

View file

@ -76,6 +76,11 @@ public:
return String::number(m_value);
}
bool operator==(Number const& other) const
{
return m_type == other.m_type && m_value == other.m_value;
}
private:
float m_value { 0 };
Type m_type;