mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:27:45 +00:00
BindingsGenerator: Conditionally check dictionary member is string
This adds the condition member.type->is_string() to the if statement, so that we now conditionally check the dictionary member is a new string and associated with an optional constructor parameter.
This commit is contained in:
parent
72a48ee1ee
commit
99f094905e
1 changed files with 1 additions and 1 deletions
|
@ -729,7 +729,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
|
|||
}
|
||||
|
||||
generate_to_cpp(dictionary_generator, member, member_property_value_name, "", member_value_name, interface, member.extended_attributes.contains("LegacyNullToEmptyString"), !member.required, member.default_value);
|
||||
if (optional && interface.extended_attributes.contains("UseNewAKString")) {
|
||||
if (member.type->is_string() && optional && interface.extended_attributes.contains("UseNewAKString")) {
|
||||
dictionary_generator.append(R"~~~(
|
||||
if (@member_value_name@.has_value())
|
||||
@cpp_name@.@member_name@ = @member_value_name@.release_value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue