mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-07-02 00:51:15 -03:00
Prefer swap() member function to std::swap. We were hitting the
inefficient generic std::swap for some derived types.
This commit is contained in:
@@ -687,13 +687,13 @@ void parse_ll_t::acquire_output(parse_node_tree_t *output, parse_error_list_t *e
|
||||
{
|
||||
if (output != NULL)
|
||||
{
|
||||
std::swap(*output, this->nodes);
|
||||
output->swap(this->nodes);
|
||||
}
|
||||
this->nodes.clear();
|
||||
|
||||
if (errors != NULL)
|
||||
{
|
||||
std::swap(*errors, this->errors);
|
||||
errors->swap(this->errors);
|
||||
}
|
||||
this->errors.clear();
|
||||
this->symbol_stack.clear();
|
||||
|
||||
Reference in New Issue
Block a user