8000 std::move fixes · pytorch/pytorch@c54597e · GitHub
[go: up one dir, main page]

Skip to content

Commit c54597e

Browse files
soumithapaszke
authored andcommitted
std::move fixes
1 parent 833b8cb commit c54597e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torch/lib/libshm/core.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ ClientSocket& get_manager_socket(char *manager_handle) {
6969
std::string str_handle(manager_handle);
7070
auto it = managers.find(str_handle);
7171
if (it == managers.end()) {
72-
auto result = managers.emplace(std::move(str_handle), ClientSocket(str_handle));
72+
auto socket = ClientSocket(str_handle);
73+
auto result = managers.emplace(std::move(str_handle), std::move(socket));
7374
return result.first->second;
7475
} else {
7576
return it->second;

0 commit comments

Comments
 (0)
0