diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2012-02-16 08:02:13 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2012-02-16 08:02:13 +0000 |
| commit | 571d6a4bb768e0042ff544e4d9854204c4f3622f (patch) | |
| tree | c110eb1c125abe5349494025c93858d698d43978 | |
| parent | 255bd27d4e26d2e5cef9ad4d57bb9c18bc986c67 (diff) | |
| download | libbu++-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 '')
| -rw-r--r-- | src/sptr.h | 9 |
1 files changed, 8 insertions, 1 deletions
| @@ -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 *) |
