mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-27 16:51:15 -03:00
Stop creating subclasses of block_t
Move all block_t creation methods to static methods, and stop creating subclasses (all of which are now empty).
This commit is contained in:
@@ -822,8 +822,8 @@ static bool exec_block_or_func_process(parser_t &parser, std::shared_ptr<job_t>
|
||||
wcstring_list_t argv = p->get_argv_array().to_list();
|
||||
// Remove the function name from argv.
|
||||
if (!argv.empty()) argv.erase(argv.begin());
|
||||
function_block_t *fb =
|
||||
parser.push_block<function_block_t>(func_name, argv, props->shadow_scope);
|
||||
block_t *fb =
|
||||
parser.push_block(block_t::function_block(func_name, argv, props->shadow_scope));
|
||||
function_prepare_environment(parser.vars(), func_name, std::move(argv), inherit_vars);
|
||||
parser.forbid_function(func_name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user