mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
LibWeb: Emit optional boolean variable definition in WrapperGenerator
The removed if in this commit was inside the else branch of an if with the same condition, making it a no-op, as well as breaking optional booleans.
This commit is contained in:
parent
dbc5b05b7a
commit
0072581693
1 changed files with 1 additions and 3 deletions
|
@ -615,12 +615,10 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
|
||||||
bool @cpp_name@;
|
bool @cpp_name@;
|
||||||
)~~~");
|
)~~~");
|
||||||
} else {
|
} else {
|
||||||
if (!optional_default_value.is_null()) {
|
|
||||||
scoped_generator.append(R"~~~(
|
scoped_generator.append(R"~~~(
|
||||||
Optional<bool> @cpp_name@;
|
Optional<bool> @cpp_name@;
|
||||||
)~~~");
|
)~~~");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
scoped_generator.append(R"~~~(
|
scoped_generator.append(R"~~~(
|
||||||
if (!@js_name@@js_suffix@.is_undefined())
|
if (!@js_name@@js_suffix@.is_undefined())
|
||||||
@cpp_name@ = @js_name@@js_suffix@.to_boolean();)~~~");
|
@cpp_name@ = @js_name@@js_suffix@.to_boolean();)~~~");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue