mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
AK: Use Deducing this for OptionalBase
This is taken from and akin to https://github.com/SerenityOS/serenity/pull/25894
This commit is contained in:
parent
fd4888e800
commit
bcd01da91d
Notes:
github-actions[bot]
2025-11-20 15:28:30 +00:00
Author: https://github.com/Hendiadyoin1
Commit: bcd01da91d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6782
12 changed files with 81 additions and 94 deletions
|
|
@ -34,7 +34,7 @@ WebIDL::ExceptionOr<GC::Ref<CSSMathClamp>> CSSMathClamp::construct_impl(JS::Real
|
|||
// 2. Let type be the result of adding the types of lower, value, and upper. If type is failure, throw a TypeError.
|
||||
auto type = lower_rectified->type()
|
||||
.added_to(value_rectified->type())
|
||||
.map([&](auto& type) { return type.added_to(upper_rectified->type()); });
|
||||
.map([&](auto&& type) { return type.added_to(upper_rectified->type()); });
|
||||
if (!type.has_value()) {
|
||||
return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, "Cannot create a CSSMathClamp with values of incompatible types"sv };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue