aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/RefCount.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-01-01 23:38:03 (GMT)
committerfluxgen <fluxgen>2003-01-01 23:38:03 (GMT)
commit7a36fd6204083661cf0e573e5c4e04b700b8c718 (patch)
tree6c4f66b72be668a5e78d0dd415d05a9e254ba920 /src/FbTk/RefCount.hh
parent62fc23f0e3481e38c33ed773f2a540ecf748a70e (diff)
downloadfluxbox-7a36fd6204083661cf0e573e5c4e04b700b8c718.zip
fluxbox-7a36fd6204083661cf0e573e5c4e04b700b8c718.tar.bz2
fixed minor bug in operator = Pointer
Diffstat (limited to 'src/FbTk/RefCount.hh')
-rw-r--r--src/FbTk/RefCount.hh5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/FbTk/RefCount.hh b/src/FbTk/RefCount.hh
index f437837..7d131b3 100644
--- a/src/FbTk/RefCount.hh
+++ b/src/FbTk/RefCount.hh
@@ -92,9 +92,8 @@ RefCount<Pointer> &RefCount<Pointer>::operator = (const RefCount<Pointer> &copy)
92template <typename Pointer> 92template <typename Pointer>
93RefCount<Pointer> &RefCount<Pointer>::operator = (Pointer *p) { 93RefCount<Pointer> &RefCount<Pointer>::operator = (Pointer *p) {
94 decRefCount(); 94 decRefCount();
95 m_data = p; 95 m_data = p; // set data pointer
96 if (m_refcount == 0) 96 m_refcount = new unsigned int(0); // create new counter
97 m_refcount = new unsigned int(0);
98 incRefCount(); 97 incRefCount();
99} 98}
100 99