aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-02-16 08:02:13 +0000
committerMike Buland <eichlan@xagasoft.com>2012-02-16 08:02:13 +0000
commit571d6a4bb768e0042ff544e4d9854204c4f3622f (patch)
treec110eb1c125abe5349494025c93858d698d43978 /src
parent255bd27d4e26d2e5cef9ad4d57bb9c18bc986c67 (diff)
downloadlibbu++-571d6a4bb768e0042ff544e4d9854204c4f3622f.tar.gz
libbu++-571d6a4bb768e0042ff544e4d9854204c4f3622f.tar.bz2
libbu++-571d6a4bb768e0042ff544e4d9854204c4f3622f.tar.xz
libbu++-571d6a4bb768e0042ff544e4d9854204c4f3622f.zip
Bu::SPtr has a clear function now, and also the function count() didn't match
the rest of the API, now it's getRefCount()
Diffstat (limited to 'src')
-rw-r--r--src/sptr.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sptr.h b/src/sptr.h
index 4e581a9..4eb5a52 100644
--- a/src/sptr.h
+++ b/src/sptr.h
@@ -59,11 +59,18 @@ namespace Bu
59 * Get the number of references to this pointer. 59 * Get the number of references to this pointer.
60 *@returns (int32_t) The number of references to this pointer. 60 *@returns (int32_t) The number of references to this pointer.
61 */ 61 */
62 int32_t count() const 62 int32_t getRefCount() const
63 { 63 {
64 return *pRefCnt; 64 return *pRefCnt;
65 } 65 }
66 66
67 void clear()
68 {
69 decCount();
70 pRefCnt = NULL;
71 pData = NULL;
72 }
73
67 /** 74 /**
68 * Pointer access operator. 75 * Pointer access operator.
69 *@returns (const T *) 76 *@returns (const T *)