mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:07:35 +00:00
LibJS: Use move semantics more when creating Reference objects
Turns a bunch of FlyString copies into moves.
This commit is contained in:
parent
6704961c82
commit
0d2c3f62d3
5 changed files with 18 additions and 18 deletions
|
@ -22,17 +22,17 @@ public:
|
|||
};
|
||||
|
||||
Reference() { }
|
||||
Reference(BaseType type, PropertyName const& name, bool strict)
|
||||
Reference(BaseType type, PropertyName name, bool strict)
|
||||
: m_base_type(type)
|
||||
, m_name(name)
|
||||
, m_name(move(name))
|
||||
, m_strict(strict)
|
||||
{
|
||||
}
|
||||
|
||||
Reference(Value base, PropertyName const& name, Value this_value, bool strict = false)
|
||||
Reference(Value base, PropertyName name, Value this_value, bool strict = false)
|
||||
: m_base_type(BaseType::Value)
|
||||
, m_base_value(base)
|
||||
, m_name(name)
|
||||
, m_name(move(name))
|
||||
, m_this_value(this_value)
|
||||
, m_strict(strict)
|
||||
{
|
||||
|
@ -44,10 +44,10 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
Reference(Environment& base, FlyString const& referenced_name, bool strict = false)
|
||||
Reference(Environment& base, FlyString referenced_name, bool strict = false)
|
||||
: m_base_type(BaseType::Environment)
|
||||
, m_base_environment(&base)
|
||||
, m_name(referenced_name)
|
||||
, m_name(move(referenced_name))
|
||||
, m_strict(strict)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue