mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37: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
|
@ -68,7 +68,7 @@ void print(const JsonValue& value, int spaces_per_indent, int indent, bool use_c
|
|||
{
|
||||
if (value.is_object()) {
|
||||
size_t printed_members = 0;
|
||||
auto object = value.as_object();
|
||||
auto& object = value.as_object();
|
||||
outln("{{");
|
||||
object.for_each_member([&](auto& member_name, auto& member_value) {
|
||||
++printed_members;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue