aboutsummaryrefslogtreecommitdiff
path: root/src/sptr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sptr.h')
-rw-r--r--src/sptr.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sptr.h b/src/sptr.h
index c711a89..51e27b0 100644
--- a/src/sptr.h
+++ b/src/sptr.h
@@ -30,11 +30,11 @@ public:
30 pRefCnt( NULL ), 30 pRefCnt( NULL ),
31 pData( pSrc ) 31 pData( pSrc )
32 { 32 {
33 pRefCnt = new uint32_t; 33 pRefCnt = new int32_t;
34 (*pRefCnt) = 1; 34 (*pRefCnt) = 1;
35 } 35 }
36 36
37 uint32_t count() 37 int32_t count()
38 { 38 {
39 return *pRefCnt; 39 return *pRefCnt;
40 } 40 }
@@ -55,6 +55,8 @@ public:
55 pRefCnt = src.pRefCnt; 55 pRefCnt = src.pRefCnt;
56 pData = src.pData; 56 pData = src.pData;
57 (*pRefCnt) += 1; 57 (*pRefCnt) += 1;
58
59 return *this;
58 } 60 }
59 61
60 bool operator==( const SPtr<T> &src ) 62 bool operator==( const SPtr<T> &src )
@@ -78,7 +80,7 @@ private:
78 } 80 }
79 } 81 }
80 82
81 uint32_t *pRefCnt; 83 int32_t *pRefCnt;
82 T *pData; 84 T *pData;
83}; 85};
84 86