mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
Userland: Avoid a bunch of JsonObject copies
JsonValue::as_object() returns a reference.
This commit is contained in:
parent
a6248101e2
commit
16d51d78c0
Notes:
sideshowbarker
2024-07-18 17:06:20 +09:00
Author: https://github.com/linusg
Commit: 16d51d78c0
11 changed files with 12 additions and 13 deletions
|
@ -129,7 +129,7 @@ static bool print_mounts()
|
|||
VERIFY(json.has_value());
|
||||
|
||||
json.value().as_array().for_each([](auto& value) {
|
||||
auto fs_object = value.as_object();
|
||||
auto& fs_object = value.as_object();
|
||||
auto class_name = fs_object.get("class_name").to_string();
|
||||
auto mount_point = fs_object.get("mount_point").to_string();
|
||||
auto source = fs_object.get("source").as_string_or("none");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue