mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
Use std::move instead of swap in a few places where it improves clarity
This commit is contained in:
@@ -291,8 +291,8 @@ static bool io_transmogrify(const io_chain_t &in_chain, io_chain_t *out_chain,
|
||||
|
||||
// Now either return success, or clean up.
|
||||
if (success) {
|
||||
out_chain->swap(result_chain);
|
||||
out_opened_fds->swap(opened_fds);
|
||||
*out_chain = std::move(result_chain);
|
||||
*out_opened_fds = std::move(opened_fds);
|
||||
} else {
|
||||
result_chain.clear();
|
||||
io_cleanup_fds(opened_fds);
|
||||
|
||||
Reference in New Issue
Block a user