mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
Use move semantics in builtin_eval
Saves some allocations
This commit is contained in:
parent
c95e1b83c7
commit
4e1fdaf5a7
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ int builtin_eval(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
|
|||
|
||||
int status = STATUS_CMD_OK;
|
||||
if (argc > 1) {
|
||||
if (parser.eval(new_cmd.c_str(), *streams.io_chain, block_type_t::TOP) != 0) {
|
||||
if (parser.eval(std::move(new_cmd), *streams.io_chain, block_type_t::TOP) != 0) {
|
||||
// This indicates a parse error; nothing actually got executed.
|
||||
status = STATUS_CMD_ERROR;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue