mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02: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:
Notes:
sideshowbarker
2024-07-17 09:40:48 +09:00
Author: https://github.com/Dexesttp Commit: https://github.com/SerenityOS/serenity/commit/7ceeb74535 Pull-request: https://github.com/SerenityOS/serenity/pull/14497 Reviewed-by: https://github.com/linusg ✅
@@ -68,7 +68,7 @@ private:
|
||||
|
||||
while (iterator.has_next()) {
|
||||
auto name = iterator.next_path();
|
||||
auto basename = name.replace(".json", "");
|
||||
auto basename = name.replace(".json", "", ReplaceMode::FirstOnly);
|
||||
if (!selected_keymaps.find(basename).is_end())
|
||||
continue;
|
||||
m_character_map_files.append(basename);
|
||||
|
||||
Reference in New Issue
Block a user