mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
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
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 h = maybe_h.value();
|
||||||
float s = maybe_s.value() / 100.0f;
|
float s = maybe_s.value() / 100.0f;
|
||||||
float l = maybe_l.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")) {
|
} 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 s = maybe_s.value() / 100.0f;
|
||||||
float l = maybe_l.value() / 100.0f;
|
float l = maybe_l.value() / 100.0f;
|
||||||
float a = maybe_a.value();
|
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
Add a link
Reference in a new issue