Skip to content

Commit

Permalink
std::move fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
soumith authored and apaszke committed Feb 3, 2017
1 parent 833b8cb commit c54597e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torch/lib/libshm/core.cpp
Expand Up @@ -69,7 +69,8 @@ ClientSocket& get_manager_socket(char *manager_handle) {
std::string str_handle(manager_handle);
auto it = managers.find(str_handle);
if (it == managers.end()) {
auto result = managers.emplace(std::move(str_handle), ClientSocket(str_handle));
auto socket = ClientSocket(str_handle);
auto result = managers.emplace(std::move(str_handle), std::move(socket));
return result.first->second;
} else {
return it->second;
Expand Down

0 comments on commit c54597e

Please sign in to comment.