Skip to content

Commit

Permalink
json: nit: simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ochafik committed Jun 22, 2024
1 parent 5c2d3fa commit f714d7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/json-schema-to-grammar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ class SchemaConverter {
}
prop_names.push_back(prop_name);
}
if (additional_properties.is_null() || additional_properties.is_object() || (additional_properties.is_boolean() && additional_properties.get<bool>())) {
if (!(additional_properties.is_boolean() && !additional_properties.get<bool>())) {
std::string sub_name = name + (name.empty() ? "" : "-") + "additional";
std::string value_rule =
additional_properties.is_object() ? visit(additional_properties, sub_name + "-value")
Expand Down

0 comments on commit f714d7f

Please sign in to comment.