From 2828a0bb77e2cf1bc6fbd38c3bca5cfaddb23b80 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 24 Nov 2006 23:49:50 +0000 Subject: Fixed size bug. --- src/hash.h | 2 ++ src/sptr.h | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/hash.h b/src/hash.h index d847add..d53e2be 100644 --- a/src/hash.h +++ b/src/hash.h @@ -461,6 +461,8 @@ private: aKeys = ka.allocate( nCapacity ); aValues = va.allocate( nCapacity ); + nFilled = 0; + // Re-insert all of the old data (except deleted items) for( uint32_t j = 0; j < nOldCapacity; j++ ) { diff --git a/src/sptr.h b/src/sptr.h index 51e27b0..d152fb4 100644 --- a/src/sptr.h +++ b/src/sptr.h @@ -64,6 +64,16 @@ public: return pData == src.pData; } + operator bool() + { + return pRefCnt != NULL; + } + + bool isSet() + { + return pRefCnt != NULL; + } + private: void decCount() { -- cgit v1.2.3