mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-15 23:01:52 +00:00
LibWeb/CSS: Remove unnecessary CalculatedStyleValue const-casts
This commit is contained in:
parent
69a0f28d04
commit
0149f7d4e4
Notes:
github-actions[bot]
2024-12-21 17:15:50 +00:00
Author: https://github.com/AtkinsSJ
Commit: 0149f7d4e4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2966
3 changed files with 8 additions and 8 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue