mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Avoid unnecessary copies when in JsonValue-from-array/object ctors
Knocks 1.1 seconds of loading time off of https://wpt.fyi/
This commit is contained in:
committed by
Andreas Kling
parent
055f07d742
commit
cfe3dbe99f
@@ -195,12 +195,12 @@ JsonValue::JsonValue(JsonArray const& value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
JsonValue::JsonValue(JsonObject&& value)
|
JsonValue::JsonValue(JsonObject&& value)
|
||||||
: m_value(make<JsonObject>(value))
|
: m_value(make<JsonObject>(move(value)))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
JsonValue::JsonValue(JsonArray&& value)
|
JsonValue::JsonValue(JsonArray&& value)
|
||||||
: m_value(make<JsonArray>(value))
|
: m_value(make<JsonArray>(move(value)))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user