mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +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
|
@ -56,7 +56,7 @@ int main(int argc, char** argv)
|
|||
VERIFY(json_result.has_value());
|
||||
auto json = json_result.value().as_array();
|
||||
json.for_each([](auto& value) {
|
||||
auto fs_object = value.as_object();
|
||||
auto& fs_object = value.as_object();
|
||||
auto fs = fs_object.get("class_name").to_string();
|
||||
auto total_block_count = fs_object.get("total_block_count").to_u64();
|
||||
auto free_block_count = fs_object.get("free_block_count").to_u64();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue