1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:07:45 +00:00

Userland: Convert config listener callbacks to use StringView

The immutability of the string is not relevant here, since the string
we're given was allocated in the IPC serialization layer and will be
destroyed shortly afterwards. Additionally, noone relies on
DeprecatedString-specific functionality. This will make it easier to
convert the IPC layer itself to String later on.
This commit is contained in:
kleines Filmröllchen 2023-06-26 21:05:53 +02:00 committed by Sam Atkins
parent 5f1dbbaaa6
commit 33829f05fe
22 changed files with 46 additions and 46 deletions

View file

@ -769,7 +769,7 @@ size_t Calendar::day_of_week_index(DeprecatedString const& day_name)
return AK::find_index(day_names.begin(), day_names.end(), day_name);
}
void Calendar::config_string_did_change(DeprecatedString const& domain, DeprecatedString const& group, DeprecatedString const& key, DeprecatedString const& value)
void Calendar::config_string_did_change(StringView domain, StringView group, StringView key, StringView value)
{
if (domain == "Calendar" && group == "View" && key == "FirstDayOfWeek") {
m_first_day_of_week = static_cast<DayOfWeek>(day_of_week_index(value));
@ -780,7 +780,7 @@ void Calendar::config_string_did_change(DeprecatedString const& domain, Deprecat
}
}
void Calendar::config_i32_did_change(DeprecatedString const& domain, DeprecatedString const& group, DeprecatedString const& key, i32 value)
void Calendar::config_i32_did_change(StringView domain, StringView group, StringView key, i32 value)
{
if (domain == "Calendar" && group == "View" && key == "WeekendLength") {
m_weekend_length = value;