mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
Everywhere: Use AK::SaturatingMath and remove Checked saturating APIs
Port all callers of Checked<T>::saturating_add/sub/mul to the new standalone functions in AK/SaturatingMath.h, and remove the old APIs from Checked.
This commit is contained in:
committed by
Andreas Kling
parent
31f816a6d8
commit
eb789e790e
Notes:
github-actions[bot]
2026-03-21 23:21:17 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/eb789e790e8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8551
@@ -49,7 +49,7 @@ String CounterStyleValue::resolve(DOM::AbstractElement& element_reference) const
|
||||
if (m_properties.function == CounterFunction::Counter) {
|
||||
// NOTE: This should always be present because of the handling of a missing counter above.
|
||||
auto& counter = counters_set.last_counter_with_name(m_properties.counter_name).value();
|
||||
return generate_a_counter_representation(m_properties.counter_style->as_counter_style().resolve_counter_style(registered_counter_styles), registered_counter_styles, counter.value.value_or(0).value());
|
||||
return generate_a_counter_representation(m_properties.counter_style->as_counter_style().resolve_counter_style(registered_counter_styles), registered_counter_styles, counter.value.value_or(0));
|
||||
}
|
||||
|
||||
// counters( <counter-name>, <string>, <counter-style>? )
|
||||
@@ -62,7 +62,7 @@ String CounterStyleValue::resolve(DOM::AbstractElement& element_reference) const
|
||||
if (counter.name != m_properties.counter_name)
|
||||
continue;
|
||||
|
||||
auto counter_string = generate_a_counter_representation(m_properties.counter_style->as_counter_style().resolve_counter_style(registered_counter_styles), registered_counter_styles, counter.value.value_or(0).value());
|
||||
auto counter_string = generate_a_counter_representation(m_properties.counter_style->as_counter_style().resolve_counter_style(registered_counter_styles), registered_counter_styles, counter.value.value_or(0));
|
||||
if (!stb.is_empty())
|
||||
stb.append(m_properties.join_string);
|
||||
stb.append(counter_string);
|
||||
|
||||
Reference in New Issue
Block a user