IDLGenerators: Don't duplicate include statements for each import

Previously, all `#import` statements generated two identical includes
in the generated C++ source code.
This commit is contained in:
Tim Ledbetter 2024-04-23 20:02:32 +01:00 committed by Tim Flynn
parent fcf1a2a287
commit 3eb07a9b8b
Notes: sideshowbarker 2024-07-17 07:09:53 +09:00

View file

@ -3762,9 +3762,6 @@ void generate_namespace_implementation(IDL::Interface const& interface, StringBu
)~~~");
for (auto& path : interface.required_imported_paths)
generate_include_for(generator, path);
emit_includes_for_all_imports(interface, generator, interface.pair_iterator_types.has_value());
generator.append(R"~~~(
@ -4028,9 +4025,6 @@ void generate_constructor_implementation(IDL::Interface const& interface, String
}
}
for (auto& path : interface.required_imported_paths)
generate_include_for(generator, path);
emit_includes_for_all_imports(interface, generator, interface.pair_iterator_types.has_value());
generator.append(R"~~~(
@ -4301,9 +4295,6 @@ void generate_prototype_implementation(IDL::Interface const& interface, StringBu
)~~~");
}
for (auto& path : interface.required_imported_paths)
generate_include_for(generator, path);
emit_includes_for_all_imports(interface, generator, interface.pair_iterator_types.has_value());
generator.append(R"~~~(
@ -4594,9 +4585,6 @@ void generate_global_mixin_implementation(IDL::Interface const& interface, Strin
)~~~");
for (auto& path : interface.required_imported_paths)
generate_include_for(generator, path);
emit_includes_for_all_imports(interface, generator, interface.pair_iterator_types.has_value());
generator.append(R"~~~(