mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
Userland: Avoid a bunch of JsonObject copies
JsonValue::as_object() returns a reference.
This commit is contained in:
parent
a6248101e2
commit
16d51d78c0
11 changed files with 12 additions and 13 deletions
|
@ -86,7 +86,7 @@ static void fill_mounts(Vector<MountInfo>& output)
|
|||
VERIFY(json.has_value());
|
||||
|
||||
json.value().as_array().for_each([&output](auto& value) {
|
||||
auto filesystem_object = value.as_object();
|
||||
auto& filesystem_object = value.as_object();
|
||||
MountInfo mount_info;
|
||||
mount_info.mount_point = filesystem_object.get("mount_point").to_string();
|
||||
mount_info.source = filesystem_object.get("source").as_string_or("none");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue