1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:17:46 +00:00

LibJS: Use move semantics more when creating Reference objects

Turns a bunch of FlyString copies into moves.
This commit is contained in:
Andreas Kling 2021-09-11 19:03:38 +02:00
parent 6704961c82
commit 0d2c3f62d3
5 changed files with 18 additions and 18 deletions

View file

@ -70,15 +70,15 @@ public:
: m_type(Type::String)
, m_string(FlyString(string))
{
VERIFY(!string.is_null());
VERIFY(!m_string.is_null());
}
PropertyName(FlyString const& string, StringMayBeNumber string_may_be_number = StringMayBeNumber::Yes)
PropertyName(FlyString string, StringMayBeNumber string_may_be_number = StringMayBeNumber::Yes)
: m_type(Type::String)
, m_string_may_be_number(string_may_be_number == StringMayBeNumber::Yes)
, m_string(string)
, m_string(move(string))
{
VERIFY(!string.is_null());
VERIFY(!m_string.is_null());
}
PropertyName(Symbol& symbol)