aboutsummaryrefslogtreecommitdiff
path: root/src/sptr.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-03-02 19:40:02 +0000
committerMike Buland <eichlan@xagasoft.com>2007-03-02 19:40:02 +0000
commit3f064aa71f19725fa652fcd20fcf3816664fbaf2 (patch)
tree5a89ca67f9f7c2d4b341df18fbc074898907f622 /src/sptr.h
parent9e85e4d8f31fcfa97cc95e43fa8c3b51434dcb7b (diff)
downloadlibbu++-3f064aa71f19725fa652fcd20fcf3816664fbaf2.tar.gz
libbu++-3f064aa71f19725fa652fcd20fcf3816664fbaf2.tar.bz2
libbu++-3f064aa71f19725fa652fcd20fcf3816664fbaf2.tar.xz
libbu++-3f064aa71f19725fa652fcd20fcf3816664fbaf2.zip
Removed debugging from the Hash
Diffstat (limited to '')
-rw-r--r--src/sptr.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sptr.h b/src/sptr.h
index e72644d..c95dad8 100644
--- a/src/sptr.h
+++ b/src/sptr.h
@@ -23,7 +23,8 @@ public:
23 pRefCnt( src.pRefCnt ), 23 pRefCnt( src.pRefCnt ),
24 pData( src.pData ) 24 pData( src.pData )
25 { 25 {
26 (*pRefCnt) += 1; 26 if( pRefCnt )
27 (*pRefCnt) += 1;
27 } 28 }
28 29
29 SPtr( T *pSrc ) : 30 SPtr( T *pSrc ) :
@@ -80,6 +81,7 @@ private:
80 if( pRefCnt ) 81 if( pRefCnt )
81 { 82 {
82 (*pRefCnt) -= 1; 83 (*pRefCnt) -= 1;
84 printf("Decrementing ref-count to %d\n", *pRefCnt );
83 if( (*pRefCnt) == 0 ) 85 if( (*pRefCnt) == 0 )
84 { 86 {
85 delete pRefCnt; 87 delete pRefCnt;