mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 19:31:14 -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:
@@ -235,9 +235,8 @@ static int builtin_set_color(parser_t &parser, wchar_t **argv)
|
||||
output_set_writer(saved_writer_func);
|
||||
|
||||
/* Output the collected string */
|
||||
std::string local_output;
|
||||
std::swap(builtin_set_color_output, local_output);
|
||||
stdout_buffer.append(str2wcstring(local_output));
|
||||
stdout_buffer.append(str2wcstring(builtin_set_color_output));
|
||||
builtin_set_color_output.clear();
|
||||
|
||||
return STATUS_BUILTIN_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user