mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Refactor: Modernize disallowed copy constructors/assignment
Use C++11's better capability of expressing an interface of a non-copyable class by publicly deleting its copy ctor and assignment operator instead of just declaring them private.
This commit is contained in:
@@ -702,13 +702,11 @@ public:
|
||||
|
||||
CNode(NodeId id, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress &addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const CAddress &addrBindIn, const std::string &addrNameIn = "", bool fInboundIn = false);
|
||||
~CNode();
|
||||
CNode(const CNode&) = delete;
|
||||
CNode& operator=(const CNode&) = delete;
|
||||
|
||||
private:
|
||||
CNode(const CNode&);
|
||||
void operator=(const CNode&);
|
||||
const NodeId id;
|
||||
|
||||
|
||||
const uint64_t nLocalHostNonce;
|
||||
// Services offered to this peer
|
||||
const ServiceFlags nLocalServices;
|
||||
|
||||
Reference in New Issue
Block a user