aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorDan Raviv <dan@soundradix.com>2017-09-16 13:06:05 +0300
committerDan Raviv <dan@soundradix.com>2017-09-16 13:06:05 +0300
commit2a07f878a80003f2142d5052d015a9ac81a3a6bc (patch)
tree43e85852061f076a5a247cbb2eea8a8c59c73ce8 /src/net.h
parente278f86c536921032e8288625dc5f3af610f2ec8 (diff)
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.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/net.h b/src/net.h
index ca2433aa54..cfc383ced5 100644
--- a/src/net.h
+++ b/src/net.h
@@ -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;