From d1f489b847ad445349b75a3044578535544e27d5 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Sat, 23 Oct 2021 13:07:47 +0100 Subject: LibWeb: Explicitly cast parameters to Color::from_hsl/hsla() CLion was giving me the angry red underlines about this. --- Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp') 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 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(h), static_cast(s), static_cast(l)); } } } else if (function.name().equals_ignoring_case("hsla")) { @@ -2240,7 +2240,7 @@ Optional 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(h), static_cast(s), static_cast(l), static_cast(a)); } } } -- cgit v1.2.3