mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
LibWeb: Move generated #include statement for iterators out of loop
When an IDL file has #imports and the IDL interface exposes an iterator, the bindings generator would generate #include statements missing the class name of the iterator in the form 'LibWeb/{namespace}/Iterator'. This change only generates the iterator #include statement for the top interface that is the iterator.
This commit is contained in:
parent
1ef03c9cc5
commit
680e970597
1 changed files with 4 additions and 4 deletions
|
@ -248,13 +248,13 @@ static void emit_includes_for_all_imports(auto& interface, auto& generator, bool
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
generate_include_for(generator, interface->module_own_path);
|
generate_include_for(generator, interface->module_own_path);
|
||||||
|
}
|
||||||
|
|
||||||
if (is_iterator) {
|
if (is_iterator) {
|
||||||
auto iterator_path = DeprecatedString::formatted("{}Iterator", interface->fully_qualified_name.replace("::"sv, "/"sv, ReplaceMode::All));
|
auto iterator_path = DeprecatedString::formatted("{}Iterator", interface.fully_qualified_name.replace("::"sv, "/"sv, ReplaceMode::All));
|
||||||
generate_include_for_iterator(generator, iterator_path);
|
generate_include_for_iterator(generator, iterator_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
template<typename ParameterType>
|
template<typename ParameterType>
|
||||||
static void generate_to_deprecated_string(SourceGenerator& scoped_generator, ParameterType const& parameter, bool variadic, bool optional, Optional<DeprecatedString> const& optional_default_value)
|
static void generate_to_deprecated_string(SourceGenerator& scoped_generator, ParameterType const& parameter, bool variadic, bool optional, Optional<DeprecatedString> const& optional_default_value)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue