fixed minor bug in operator = Pointer
This commit is contained in:
parent
62fc23f0e3
commit
7a36fd6204
1 changed files with 2 additions and 3 deletions
|
@ -92,9 +92,8 @@ RefCount<Pointer> &RefCount<Pointer>::operator = (const RefCount<Pointer> ©)
|
|||
template <typename Pointer>
|
||||
RefCount<Pointer> &RefCount<Pointer>::operator = (Pointer *p) {
|
||||
decRefCount();
|
||||
m_data = p;
|
||||
if (m_refcount == 0)
|
||||
m_refcount = new unsigned int(0);
|
||||
m_data = p; // set data pointer
|
||||
m_refcount = new unsigned int(0); // create new counter
|
||||
incRefCount();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue