mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +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
|
@ -123,7 +123,7 @@ int main(int argc, char** argv)
|
|||
});
|
||||
|
||||
for (auto& value : sorted_regions) {
|
||||
auto if_object = value.as_object();
|
||||
auto& if_object = value.as_object();
|
||||
|
||||
auto bytes_in = if_object.get("bytes_in").to_string();
|
||||
auto bytes_out = if_object.get("bytes_out").to_string();
|
||||
|
@ -174,7 +174,7 @@ int main(int argc, char** argv)
|
|||
});
|
||||
|
||||
for (auto& value : sorted_regions) {
|
||||
auto if_object = value.as_object();
|
||||
auto& if_object = value.as_object();
|
||||
|
||||
auto local_address = if_object.get("local_address").to_string();
|
||||
auto local_port = if_object.get("local_port").to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue