Skip to content
Permalink
Browse files
Network: Delete copy constructor and use std::move instead (#11642)
This is a follow-up change which disables class copies where possible to avoid unnecessary memory movements.
  • Loading branch information
SmallJoker committed Dec 1, 2021
1 parent 1dc1305 commit 57a59ae92d4bbfa4fdd60d7acd72c6440f63a49c
Showing with 600 additions and 552 deletions.
  1. +1 −1 src/client/client.cpp
  2. +263 −182 src/network/connection.cpp
  3. +182 −234 src/network/connection.h
  4. +92 −98 src/network/connectionthreads.cpp
  5. +25 −6 src/network/connectionthreads.h
  6. +5 −5 src/unittest/test_connection.cpp
  7. +32 −26 src/util/pointer.h
@@ -877,7 +877,7 @@ void Client::ProcessData(NetworkPacket *pkt)
*/
if(sender_peer_id != PEER_ID_SERVER) {
infostream << "Client::ProcessData(): Discarding data not "
"coming from server: peer_id=" << sender_peer_id
"coming from server: peer_id=" << sender_peer_id << " command=" << pkt->getCommand()
<< std::endl;
return;
}

0 comments on commit 57a59ae

Please sign in to comment.