mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +00:00
Utilities/lsof: Replace uses of JsonObject::get_deprecated()/get_ptr()
This commit is contained in:
parent
5d8a87bf1f
commit
e8ebbcdbc5
|
@ -87,9 +87,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_deprecated("fd"sv).to_int();
|
||||
open_file.fd = object.as_object().get_integer<int>("fd"sv).value();
|
||||
|
||||
DeprecatedString name = object.as_object().get_deprecated("absolute_path"sv).to_deprecated_string();
|
||||
DeprecatedString name = object.as_object().get_deprecated_string("absolute_path"sv).value_or({});
|
||||
VERIFY(parse_name(name, open_file));
|
||||
open_file.full_name = name;
|
||||
|
||||
|
|
Loading…
Reference in a new issue