LibWeb: Explicitly cast parameters to Color::from_hsl/hsla()
CLion was giving me the angry red underlines about this.
This commit is contained in:
parent
21b65de1ec
commit
d1f489b847
Notes:
sideshowbarker
2024-07-18 01:59:11 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/d1f489b847a Pull-request: https://github.com/SerenityOS/serenity/pull/10599 Reviewed-by: https://github.com/awesomekling
1 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue