mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
fix various cppcheck warnings/errors
This commit is contained in:
1 parent
d4e6fd545a
commit
9c2268fa41
10 files changed
+36
-35
No files matched your search
+1
-4
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user