mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
LibJS: Pass unwinding target labels a bit more efficiently
Use const reference or move semantics when passing these labels.
This commit is contained in:
parent
e24f1dfbe1
commit
f290048662
1 changed files with 2 additions and 2 deletions
|
@ -166,14 +166,14 @@ public:
|
||||||
void unwind(ScopeType type, FlyString label = {})
|
void unwind(ScopeType type, FlyString label = {})
|
||||||
{
|
{
|
||||||
m_unwind_until = type;
|
m_unwind_until = type;
|
||||||
m_unwind_until_label = label;
|
m_unwind_until_label = move(label);
|
||||||
}
|
}
|
||||||
void stop_unwind()
|
void stop_unwind()
|
||||||
{
|
{
|
||||||
m_unwind_until = ScopeType::None;
|
m_unwind_until = ScopeType::None;
|
||||||
m_unwind_until_label = {};
|
m_unwind_until_label = {};
|
||||||
}
|
}
|
||||||
bool should_unwind_until(ScopeType type, FlyString label = {}) const
|
bool should_unwind_until(ScopeType type, FlyString const& label) const
|
||||||
{
|
{
|
||||||
if (m_unwind_until_label.is_null())
|
if (m_unwind_until_label.is_null())
|
||||||
return m_unwind_until == type;
|
return m_unwind_until == type;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue