diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-05-19 21:08:23 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-19 21:36:57 +0200 |
commit | fdfa5c0bc72ca84ead96bed430acec988e47c49a (patch) | |
tree | f66a90b2439980b4b4748a81537bf13c12629958 /Userland/Shell/Parser.cpp | |
parent | d954c11f6689ae8b1119a76644b546547ee314b7 (diff) | |
download | serenity-fdfa5c0bc72ca84ead96bed430acec988e47c49a.zip |
Shell: Avoid moving AK::Function instances while inside them
Diffstat (limited to 'Userland/Shell/Parser.cpp')
-rw-r--r-- | Userland/Shell/Parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Shell/Parser.cpp b/Userland/Shell/Parser.cpp index a473cf7349..a7df601c90 100644 --- a/Userland/Shell/Parser.cpp +++ b/Userland/Shell/Parser.cpp @@ -2037,7 +2037,7 @@ bool Parser::parse_heredoc_entries() // until we find a line that contains the key auto end_condition = move(m_end_condition); found_key = false; - set_end_condition([this, end = record.end, &found_key] { + set_end_condition(make<Function<bool()>>([this, end = record.end, &found_key] { if (found_key) return true; auto offset = current_position(); @@ -2060,7 +2060,7 @@ bool Parser::parse_heredoc_entries() } restore_to(offset.offset, offset.line); return false; - }); + })); auto expr = parse_doublequoted_string_inner(); set_end_condition(move(end_condition)); |