mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 21:45:29 +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:
@@ -1183,7 +1183,7 @@ void Window::set_modified(bool modified)
|
||||
|
||||
String Window::computed_title() const
|
||||
{
|
||||
String title = m_title.replace("[*]", is_modified() ? " (*)" : "");
|
||||
String title = m_title.replace("[*]", is_modified() ? " (*)" : "", ReplaceMode::FirstOnly);
|
||||
if (client() && client()->is_unresponsive())
|
||||
return String::formatted("{} (Not responding)", title);
|
||||
return title;
|
||||
|
||||
Reference in New Issue
Block a user