1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

LibWeb: Use floats instead of doubles for CSS numbers

Using doubles isn't necessary, and they make things slightly bigger and
slower, so let's use floats instead.
This commit is contained in:
Sam Atkins 2022-03-21 17:22:05 +00:00 committed by Andreas Kling
parent 1f5b5d3f99
commit 0795b9f7bb
6 changed files with 33 additions and 33 deletions

View file

@ -27,7 +27,7 @@ String MediaFeatureValue::to_string() const
[](Length const& length) { return length.to_string(); },
[](Ratio const& ratio) { return ratio.to_string(); },
[](Resolution const& resolution) { return resolution.to_string(); },
[](double number) { return String::number(number); });
[](float number) { return String::number(number); });
}
bool MediaFeatureValue::is_same_type(MediaFeatureValue const& other) const
@ -37,7 +37,7 @@ bool MediaFeatureValue::is_same_type(MediaFeatureValue const& other) const
[&](Length const&) { return other.is_length(); },
[&](Ratio const&) { return other.is_ratio(); },
[&](Resolution const&) { return other.is_resolution(); },
[&](double) { return other.is_number(); });
[&](float) { return other.is_number(); });
}
String MediaFeature::to_string() const