summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/hash.h23
1 files changed, 9 insertions, 14 deletions
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
26template<typename key, typename value, typename sizecalc = __calcNextTSize_fast, typename keyalloc = std::allocator<key>, typename valuealloc = std::allocator<value>, typename challoc = std::allocator<uint32_t> > 26template<typename key, typename value, typename sizecalc = __calcNextTSize_fast, typename keyalloc = std::allocator<key>, typename valuealloc = std::allocator<value>, typename challoc = std::allocator<uint32_t> >
27class Hash; 27class Hash;
28 28
29template< typename key, typename _value, typename sizecalc, typename keyalloc, typename valuealloc, typename challoc > 29template< typename key, typename _value, typename sizecalc = __calcNextTSize_fast, typename keyalloc = std::allocator<key>, typename valuealloc = std::allocator<_value>, typename challoc = std::allocator<uint32_t> >
30struct HashProxy 30struct HashProxy
31{ 31{
32 friend class Hash<key, _value, sizecalc, keyalloc, valuealloc, challoc>; 32 friend class Hash<key, _value, sizecalc, keyalloc, valuealloc, challoc>;
@@ -139,19 +139,6 @@ public:
139 ca.deallocate( aHashCodes, nCapacity ); 139 ca.deallocate( aHashCodes, nCapacity );
140 } 140 }
141 141
142 void clearBits()
143 {
144 for( uint32_t j = 0; j < nKeysSize; j++ )
145 {
146 bFilled[j] = bDeleted[j] = 0;
147 }
148 }
149
150 int hasKey( key keyval )
151 {
152 printf("%s\n", keyval );
153 }
154
155 uint32_t getCapacity() 142 uint32_t getCapacity()
156 { 143 {
157 return nCapacity; 144 return nCapacity;
@@ -307,6 +294,14 @@ public:
307 } 294 }
308 295
309private: 296private:
297 void clearBits()
298 {
299 for( uint32_t j = 0; j < nKeysSize; j++ )
300 {
301 bFilled[j] = bDeleted[j] = 0;
302 }
303 }
304
310 void fill( uint32_t loc, key &k, value &v, uint32_t hash ) 305 void fill( uint32_t loc, key &k, value &v, uint32_t hash )
311 { 306 {
312 bFilled[loc/32] |= (1<<(loc%32)); 307 bFilled[loc/32] |= (1<<(loc%32));