diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-10-23 13:07:47 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-23 18:53:17 +0200 |
commit | d1f489b847ad445349b75a3044578535544e27d5 (patch) | |
tree | 64f4e7c9f4fb453e66704c671531dc9dcde5dd30 /Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | |
parent | 21b65de1ec4136593ff5294b798fc5ff113b4d45 (diff) | |
download | serenity-d1f489b847ad445349b75a3044578535544e27d5.zip |
LibWeb: Explicitly cast parameters to Color::from_hsl/hsla()
CLion was giving me the angry red underlines about this.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index a49b40cacb..31a45cdee7 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -2214,7 +2214,7 @@ Optional<Color> Parser::parse_color(ParsingContext const&, StyleComponentValueRu float h = maybe_h.value(); float s = maybe_s.value() / 100.0f; float l = maybe_l.value() / 100.0f; - return Color::from_hsl(h, s, l); + return Color::from_hsl(static_cast<double>(h), static_cast<double>(s), static_cast<double>(l)); } } } else if (function.name().equals_ignoring_case("hsla")) { @@ -2240,7 +2240,7 @@ Optional<Color> Parser::parse_color(ParsingContext const&, StyleComponentValueRu float s = maybe_s.value() / 100.0f; float l = maybe_l.value() / 100.0f; float a = maybe_a.value(); - return Color::from_hsla(h, s, l, a); + return Color::from_hsla(static_cast<double>(h), static_cast<double>(s), static_cast<double>(l), static_cast<double>(a)); } } } |