Skip to content

Commit

Permalink
[coro_io]fix: std::move used on a local var as return value (#490)
Browse files Browse the repository at this point in the history
Moving local variables as return value interferes with RVO.
  • Loading branch information
scuzqy authored Nov 13, 2023
1 parent 873d75f commit 51505c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/ylt/coro_io/channel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class channel {
g_clients_pool<client_t, io_context_pool_t>()) {
channel ch;
ch.init(hosts, config, client_pools);
return std::move(ch);
return ch;
}

private:
Expand Down

0 comments on commit 51505c4

Please sign in to comment.