Skip to content
Snippets Groups Projects
Commit 5934543a authored by esaunders's avatar esaunders
Browse files

Added copy constructor to RegistryKey.

parent 90c2b5d9
Branches
Tags
No related merge requests found
......@@ -35,6 +35,13 @@ namespace Rejistry {
_nk = new NKRecord(*(rk._nk));
}
RegistryKey& RegistryKey::operator=(const RegistryKey & rk) {
if (this != &rk) {
_nk = new NKRecord(*(rk._nk));
}
return *this;
}
RegistryKey::~RegistryKey() {
if (_nk != NULL) {
delete _nk;
......
......@@ -47,6 +47,7 @@ namespace Rejistry {
RegistryKey(NKRecord* nk) { _nk = nk; }
RegistryKey(const RegistryKey& );
RegistryKey& operator=(const RegistryKey &);
virtual ~RegistryKey();
......@@ -97,7 +98,6 @@ namespace Rejistry {
private:
RegistryKey();
RegistryKey& operator=(const RegistryKey &);
NKRecord * _nk;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment