mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +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
|
@ -69,7 +69,7 @@ int main(int argc, char** argv)
|
|||
auto json = JsonValue::from_string(file_contents);
|
||||
VERIFY(json.has_value());
|
||||
json.value().as_array().for_each([db, format](auto& value) {
|
||||
auto dev = value.as_object();
|
||||
auto& dev = value.as_object();
|
||||
auto seg = dev.get("seg").to_u32();
|
||||
auto bus = dev.get("bus").to_u32();
|
||||
auto device = dev.get("device").to_u32();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue