1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:34:59 +00:00

Everywhere: Add sv suffix to strings relying on StringView(char const*)

Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
This commit is contained in:
sin-ack 2022-07-11 17:32:29 +00:00 committed by Andreas Kling
parent e5f09ea170
commit 3f3f45580a
762 changed files with 8315 additions and 8316 deletions

View file

@ -83,9 +83,9 @@ static Vector<OpenFile> get_open_files_by_pid(pid_t pid)
json.as_array().for_each([pid, &files](JsonValue const& object) {
OpenFile open_file;
open_file.pid = pid;
open_file.fd = object.as_object().get("fd").to_int();
open_file.fd = object.as_object().get("fd"sv).to_int();
String name = object.as_object().get("absolute_path").to_string();
String name = object.as_object().get("absolute_path"sv).to_string();
VERIFY(parse_name(name, open_file));
open_file.full_name = name;