mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +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
Notes:
sideshowbarker
2024-07-18 12:46:40 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f290048662d
1 changed files with 2 additions and 2 deletions
|
@ -166,14 +166,14 @@ public:
|
|||
void unwind(ScopeType type, FlyString label = {})
|
||||
{
|
||||
m_unwind_until = type;
|
||||
m_unwind_until_label = label;
|
||||
m_unwind_until_label = move(label);
|
||||
}
|
||||
void stop_unwind()
|
||||
{
|
||||
m_unwind_until = ScopeType::None;
|
||||
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())
|
||||
return m_unwind_until == type;
|
||||
|
|
Loading…
Reference in a new issue