mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +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:
@@ -94,7 +94,7 @@ Result<void, String> ProjectTemplate::create_project(String const& name, String
|
||||
dbgln("Running post-create script '{}'", postcreate_script_path);
|
||||
|
||||
// Generate a namespace-safe project name (replace hyphens with underscores)
|
||||
auto namespace_safe = name.replace("-", "_", true);
|
||||
auto namespace_safe = name.replace("-", "_", ReplaceMode::All);
|
||||
|
||||
pid_t child_pid;
|
||||
char const* argv[] = { postcreate_script_path.characters(), name.characters(), path.characters(), namespace_safe.characters(), nullptr };
|
||||
|
||||
Reference in New Issue
Block a user