mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 05:44:58 +00:00
AK: Add JsonObject::set(key, &&value) overload.
This dodges a whole bunch of value copying in JsonParser.
This commit is contained in:
parent
7bb1e465c6
commit
a8aadf73e9
2 changed files with 7 additions and 2 deletions
|
@ -108,7 +108,7 @@ JsonValue JsonParser::parse_object()
|
|||
consume_specific(':');
|
||||
consume_whitespace();
|
||||
auto value = parse();
|
||||
object.set(name, value);
|
||||
object.set(name, move(value));
|
||||
consume_whitespace();
|
||||
if (peek() == '}')
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue