mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-21 06:12:30 +02:00
[net] Delete CNetMessage copy constructor/assignment op
This commit is contained in:
parent
630756cac0
commit
b5a85b365a
@ -236,6 +236,14 @@ public:
|
||||
std::string m_type;
|
||||
|
||||
CNetMessage(CDataStream&& recv_in) : m_recv(std::move(recv_in)) {}
|
||||
// Only one CNetMessage object will exist for the same message on either
|
||||
// the receive or processing queue. For performance reasons we therefore
|
||||
// delete the copy constructor and assignment operator to avoid the
|
||||
// possibility of copying CNetMessage objects.
|
||||
CNetMessage(CNetMessage&&) = default;
|
||||
CNetMessage(const CNetMessage&) = delete;
|
||||
CNetMessage& operator=(CNetMessage&&) = default;
|
||||
CNetMessage& operator=(const CNetMessage&) = delete;
|
||||
|
||||
void SetVersion(int nVersionIn)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user