diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-03-21 17:22:05 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-22 15:47:36 +0100 |
commit | 0795b9f7bbb83e37e9258da6dc780a95a548a56e (patch) | |
tree | 60ae1910fd39adcbbcd7a7969f63fa67285834a0 /Userland/Libraries/LibWeb/CSS/MediaQuery.cpp | |
parent | 1f5b5d3f9963acf75cf8f892d4e7ef210a6c738b (diff) | |
download | serenity-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.cpp | 4 |
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 |