From 1ef4ff2655e62fad53c4e67476c531c897b7d583 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 21 Nov 2006 19:00:49 +0000 Subject: Updated a thing. --- src/hash.h | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/hash.h b/src/hash.h index ff3bafd..6fdf8e1 100644 --- a/src/hash.h +++ b/src/hash.h @@ -26,7 +26,7 @@ struct __calcNextTSize_fast template, typename valuealloc = std::allocator, typename challoc = std::allocator > class Hash; -template< typename key, typename _value, typename sizecalc, typename keyalloc, typename valuealloc, typename challoc > +template< typename key, typename _value, typename sizecalc = __calcNextTSize_fast, typename keyalloc = std::allocator, typename valuealloc = std::allocator<_value>, typename challoc = std::allocator > struct HashProxy { friend class Hash; @@ -139,19 +139,6 @@ public: ca.deallocate( aHashCodes, nCapacity ); } - void clearBits() - { - for( uint32_t j = 0; j < nKeysSize; j++ ) - { - bFilled[j] = bDeleted[j] = 0; - } - } - - int hasKey( key keyval ) - { - printf("%s\n", keyval ); - } - uint32_t getCapacity() { return nCapacity; @@ -307,6 +294,14 @@ public: } private: + void clearBits() + { + for( uint32_t j = 0; j < nKeysSize; j++ ) + { + bFilled[j] = bDeleted[j] = 0; + } + } + void fill( uint32_t loc, key &k, value &v, uint32_t hash ) { bFilled[loc/32] |= (1<<(loc%32)); -- cgit v1.2.3