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

Everywhere: Pass AK::StringView by value

This commit is contained in:
Andreas Kling 2021-11-11 00:55:02 +01:00
parent ad5d217e76
commit 8b1108e485
392 changed files with 978 additions and 978 deletions

View file

@ -10,7 +10,7 @@
static bool s_set_variable = false;
static String get_variable(StringView const& name)
static String get_variable(StringView name)
{
auto path = String::formatted("/proc/sys/{}", name);
auto file = Core::File::construct(path);
@ -26,7 +26,7 @@ static String get_variable(StringView const& name)
return { (char const*)buffer.data(), buffer.size(), Chomp };
}
static bool read_variable(StringView const& name)
static bool read_variable(StringView name)
{
auto value = get_variable(name);
if (value.is_null())
@ -35,7 +35,7 @@ static bool read_variable(StringView const& name)
return true;
}
static bool write_variable(StringView const& name, StringView const& value)
static bool write_variable(StringView name, StringView value)
{
auto old_value = get_variable(name);
if (old_value.is_null())