mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 07:54:58 +00:00
AK: Use an enum instead of a bool for String::replace(all_occurences)
This commit has no behavior changes. In particular, this does not fix any of the wrong uses of the previous default parameter (which used to be 'false', meaning "only replace the first occurence in the string"). It simply replaces the default uses by String::replace(..., ReplaceMode::FirstOnly), leaving them incorrect.
This commit is contained in:
parent
b2454888e8
commit
7ceeb74535
47 changed files with 108 additions and 102 deletions
|
@ -18,7 +18,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
auto cpp_full_path = parser_tests.next_full_path();
|
||||
if (!cpp_full_path.ends_with(".cpp"))
|
||||
continue;
|
||||
auto ast_full_path = cpp_full_path.replace(".cpp", ".ast");
|
||||
auto ast_full_path = cpp_full_path.replace(".cpp", ".ast", ReplaceMode::FirstOnly);
|
||||
outln("{}", cpp_full_path);
|
||||
auto res = Core::command("/bin/sh", { "-c", String::formatted("cpp-parser {} > {}", cpp_full_path, ast_full_path) }, {});
|
||||
VERIFY(!res.is_error());
|
||||
|
@ -29,7 +29,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
auto cpp_full_path = preprocessor_tests.next_full_path();
|
||||
if (!cpp_full_path.ends_with(".cpp"))
|
||||
continue;
|
||||
auto ast_full_path = cpp_full_path.replace(".cpp", ".txt");
|
||||
auto ast_full_path = cpp_full_path.replace(".cpp", ".txt", ReplaceMode::FirstOnly);
|
||||
outln("{}", cpp_full_path);
|
||||
auto res = Core::command("/bin/sh", { "-c", String::formatted("cpp-preprocessor {} > {}", cpp_full_path, ast_full_path) }, {});
|
||||
VERIFY(!res.is_error());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue