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:
Andreas Kling
2025-01-24 16:22:38 +01:00
committed by Andreas Kling
parent 055f07d742
commit cfe3dbe99f

View File

@@ -195,12 +195,12 @@ JsonValue::JsonValue(JsonArray const& value)
}
JsonValue::JsonValue(JsonObject&& value)
: m_value(make<JsonObject>(value))
: m_value(make<JsonObject>(move(value)))
{
}
JsonValue::JsonValue(JsonArray&& value)
: m_value(make<JsonArray>(value))
: m_value(make<JsonArray>(move(value)))
{
}