fix various cppcheck warnings/errors

This commit is contained in:
Adrien Béraud committed 2022-03-29 10:15:00 -04:00
1 parent d4e6fd545a
commit 9c2268fa41
10 files changed
+36 -35

No files matched your search

+1 -4
View File
@@ -137,10 +137,7 @@ Node::openSocket(SocketCb&& cb)
if (++transaction_id == 0)
transaction_id = 1;
auto sock = std::make_shared<Socket>(std::move(cb));
auto s = sockets_.emplace(transaction_id, std::move(sock));
if (not s.second)
s.first->second = std::move(sock);
sockets_[transaction_id] = std::make_shared<Socket>(std::move(cb));
return transaction_id;
}