summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-03-21 17:22:05 +0000
committerAndreas Kling <kling@serenityos.org>2022-03-22 15:47:36 +0100
commit0795b9f7bbb83e37e9258da6dc780a95a548a56e (patch)
tree60ae1910fd39adcbbcd7a7969f63fa67285834a0 /Userland/Libraries/LibWeb/CSS/MediaQuery.cpp
parent1f5b5d3f9963acf75cf8f892d4e7ef210a6c738b (diff)
downloadserenity-0795b9f7bbb83e37e9258da6dc780a95a548a56e.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/MediaQuery.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/MediaQuery.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp b/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp
index 38331ec12e..c232236270 100644
--- a/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp
+++ b/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp
@@ -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