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:
DexesTTP 2022-07-05 22:33:15 +02:00 committed by Linus Groh
commit 7ceeb74535
Notes: sideshowbarker 2024-07-17 09:40:48 +09:00
47 changed files with 108 additions and 102 deletions

View file

@ -27,7 +27,7 @@ public:
public:
SourceFile(StringView filename)
{
String source_file_name = filename.replace("../../", source_root_path);
String source_file_name = filename.replace("../../", source_root_path, ReplaceMode::FirstOnly);
auto maybe_file = Core::File::open(source_file_name, Core::OpenMode::ReadOnly);
if (maybe_file.is_error()) {