mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb/CSS: Remove unnecessary CalculatedStyleValue const-casts
This commit is contained in:
committed by
Andreas Kling
parent
69a0f28d04
commit
0149f7d4e4
Notes:
github-actions[bot]
2024-12-21 17:15:50 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/0149f7d4e4c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2966
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user