diff options
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index 4f4c7b81c4..cb5a24f0a4 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -782,6 +782,22 @@ public: CNode& operator *() const {return *_pnode;}; CNode* operator ->() const {return _pnode;}; + + CNodeRef& operator =(const CNodeRef& other) + { + if (this != &other) { + _pnode->Release(); + _pnode = other._pnode; + _pnode->AddRef(); + } + return *this; + } + + CNodeRef(const CNodeRef& other): + _pnode(other._pnode) + { + _pnode->AddRef(); + } private: CNode *_pnode; }; |