Use std::move instead of swap in a few places where it improves clarity

This commit is contained in:
ridiculousfish
2017-01-26 16:14:50 -08:00
parent fec83fa975
commit 1efb81456b
13 changed files with 26 additions and 28 deletions

View File

@@ -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);