mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibWeb: Replace all uses of -'s and ::'s when running the IDL generator
These were obvious wrong uses of the old default "only first occurence" parameter that was used in String::replace.
This commit is contained in:
parent
7ceeb74535
commit
6c7ee391cb
Notes:
sideshowbarker
2024-07-17 09:40:45 +09:00
Author: https://github.com/Dexesttp Commit: https://github.com/SerenityOS/serenity/commit/6c7ee391cb Pull-request: https://github.com/SerenityOS/serenity/pull/14497 Reviewed-by: https://github.com/linusg ✅
1 changed files with 3 additions and 3 deletions
|
@ -153,7 +153,7 @@ static String make_input_acceptable_cpp(String const& input)
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
return input.replace("-", "_", ReplaceMode::FirstOnly);
|
||||
return input.replace("-", "_", ReplaceMode::All);
|
||||
}
|
||||
|
||||
static void generate_include_for_wrapper(auto& generator, auto& wrapper_name)
|
||||
|
@ -237,7 +237,7 @@ static void emit_includes_for_all_imports(auto& interface, auto& generator, bool
|
|||
|
||||
if (is_iterator) {
|
||||
auto iterator_name = String::formatted("{}Iterator", interface->name);
|
||||
auto iterator_path = String::formatted("{}Iterator", interface->fully_qualified_name.replace("::", "/", ReplaceMode::FirstOnly));
|
||||
auto iterator_path = String::formatted("{}Iterator", interface->fully_qualified_name.replace("::", "/", ReplaceMode::All));
|
||||
generate_include_for_iterator(generator, iterator_path, iterator_name);
|
||||
}
|
||||
|
||||
|
@ -3635,7 +3635,7 @@ void generate_iterator_prototype_implementation(IDL::Interface const& interface)
|
|||
generator.set("prototype_class", String::formatted("{}IteratorPrototype", interface.name));
|
||||
generator.set("wrapper_class", String::formatted("{}IteratorWrapper", interface.name));
|
||||
generator.set("fully_qualified_name", String::formatted("{}Iterator", interface.fully_qualified_name));
|
||||
generator.set("possible_include_path", String::formatted("{}Iterator", interface.name.replace("::", "/", ReplaceMode::FirstOnly)));
|
||||
generator.set("possible_include_path", String::formatted("{}Iterator", interface.name.replace("::", "/", ReplaceMode::All)));
|
||||
|
||||
generator.append(R"~~~(
|
||||
#include <AK/Function.h>
|
||||
|
|
Loading…
Reference in a new issue