LibWeb/CSS: Remove unnecessary CalculatedStyleValue const-casts

This commit is contained in:
Sam Atkins 2024-12-11 15:16:34 +00:00 committed by Andreas Kling
parent 69a0f28d04
commit 0149f7d4e4
Notes: github-actions[bot] 2024-12-21 17:15:50 +00:00
3 changed files with 8 additions and 8 deletions

View file

@ -407,7 +407,7 @@ int CSSStyleValue::to_font_weight() const
return round_to<int>(as_number().number());
}
if (is_calculated()) {
auto maybe_weight = const_cast<CalculatedStyleValue&>(as_calculated()).resolve_integer();
auto maybe_weight = as_calculated().resolve_integer();
if (maybe_weight.has_value())
return maybe_weight.value();
}