1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:07:34 +00:00

LibWeb: Make StyleValue constructors infallible

This commit is contained in:
Sam Atkins 2023-08-19 14:00:10 +01:00 committed by Andreas Kling
parent b2b99aba95
commit 8a8cc18cf4
86 changed files with 352 additions and 352 deletions

View file

@ -16,13 +16,13 @@ namespace Web::CSS {
class BorderRadiusShorthandStyleValue final : public StyleValueWithDefaultOperators<BorderRadiusShorthandStyleValue> {
public:
static ErrorOr<ValueComparingNonnullRefPtr<BorderRadiusShorthandStyleValue>> create(
static ValueComparingNonnullRefPtr<BorderRadiusShorthandStyleValue> create(
ValueComparingNonnullRefPtr<BorderRadiusStyleValue const> top_left,
ValueComparingNonnullRefPtr<BorderRadiusStyleValue const> top_right,
ValueComparingNonnullRefPtr<BorderRadiusStyleValue const> bottom_right,
ValueComparingNonnullRefPtr<BorderRadiusStyleValue const> bottom_left)
{
return adopt_nonnull_ref_or_enomem(new (nothrow) BorderRadiusShorthandStyleValue(move(top_left), move(top_right), move(bottom_right), move(bottom_left)));
return adopt_ref(*new (nothrow) BorderRadiusShorthandStyleValue(move(top_left), move(top_right), move(bottom_right), move(bottom_left)));
}
virtual ~BorderRadiusShorthandStyleValue() override = default;