mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 20:32:56 +03:00
LibWeb: Remove no-op calls to emit_includes_for_all_imports for headers
When called with is_header=true the method was essentailly a no-op.
This commit is contained in:
parent
61fc3c31c6
commit
32d142b06c
Notes:
sideshowbarker
2024-07-17 16:20:24 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/32d142b06c Pull-request: https://github.com/SerenityOS/serenity/pull/13424 Reviewed-by: https://github.com/alimpfard ✅
@ -202,12 +202,10 @@ static void generate_include_for(auto& generator, auto& path)
|
||||
)~~~");
|
||||
}
|
||||
|
||||
static void emit_includes_for_all_imports(auto& interface, auto& generator, bool is_header, bool is_iterator = false)
|
||||
static void emit_includes_for_all_imports(auto& interface, auto& generator, bool is_iterator = false)
|
||||
{
|
||||
Queue<RemoveCVReference<decltype(interface)> const*> interfaces;
|
||||
HashTable<String> paths_imported;
|
||||
if (is_header)
|
||||
paths_imported.set(interface.module_own_path);
|
||||
|
||||
interfaces.enqueue(&interface);
|
||||
|
||||
@ -1583,7 +1581,6 @@ void generate_header(IDL::Interface const& interface)
|
||||
for (auto& path : interface.required_imported_paths)
|
||||
generate_include_for(generator, path);
|
||||
|
||||
emit_includes_for_all_imports(interface, generator, true);
|
||||
generator.set("name", interface.name);
|
||||
generator.set("fully_qualified_name", interface.fully_qualified_name);
|
||||
generator.set("wrapper_base_class", interface.wrapper_base_class);
|
||||
@ -1747,7 +1744,7 @@ void generate_implementation(IDL::Interface const& interface)
|
||||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
)~~~");
|
||||
|
||||
emit_includes_for_all_imports(interface, generator, false);
|
||||
emit_includes_for_all_imports(interface, generator);
|
||||
|
||||
generator.append(R"~~~(
|
||||
// FIXME: This is a total hack until we can figure out the namespace for a given type somehow.
|
||||
@ -2926,7 +2923,7 @@ void generate_prototype_implementation(IDL::Interface const& interface)
|
||||
for (auto& path : interface.required_imported_paths)
|
||||
generate_include_for(generator, path);
|
||||
|
||||
emit_includes_for_all_imports(interface, generator, false, interface.pair_iterator_types.has_value());
|
||||
emit_includes_for_all_imports(interface, generator, interface.pair_iterator_types.has_value());
|
||||
|
||||
generator.append(R"~~~(
|
||||
|
||||
@ -3374,7 +3371,7 @@ void generate_iterator_implementation(IDL::Interface const& interface)
|
||||
for (auto& path : interface.required_imported_paths)
|
||||
generate_include_for(generator, path);
|
||||
|
||||
emit_includes_for_all_imports(interface, generator, false, true);
|
||||
emit_includes_for_all_imports(interface, generator, true);
|
||||
|
||||
generator.append(R"~~~(
|
||||
|
||||
@ -3487,7 +3484,7 @@ void generate_iterator_prototype_implementation(IDL::Interface const& interface)
|
||||
#endif
|
||||
)~~~");
|
||||
|
||||
emit_includes_for_all_imports(interface, generator, false, true);
|
||||
emit_includes_for_all_imports(interface, generator, true);
|
||||
|
||||
generator.append(R"~~~(
|
||||
// FIXME: This is a total hack until we can figure out the namespace for a given type somehow.
|
||||
|
Loading…
Reference in New Issue
Block a user