Lines Matching defs:_cnt
42 int _cnt, _max; // Size of bucket
76 _cnt = 0; // Dictionary is empty
89 _cnt = 0; // Empty contents
91 _bin[i]._cnt = 0; // Empty buckets, but leave allocated
114 while( j > b->_cnt ) j >>= 1; // above old bucket _cnt
121 for( j=0; j<b->_cnt; j++ ) { // Rehash all keys in this bucket
126 nb->_cnt = nbcnt = nbcnt+1;
127 b->_cnt--; // Remove key/value from lo bucket
128 b->_keyvals[j+j ] = b->_keyvals[b->_cnt+b->_cnt ];
129 b->_keyvals[j+j+1] = b->_keyvals[b->_cnt+b->_cnt+1];
140 Dict::Dict( const Dict &d ) : _size(d._size), _cnt(d._cnt), _hash(d._hash),_cmp(d._cmp), _arena(d._arena) {
146 memcpy( _bin[i]._keyvals, d._bin[i]._keyvals,_bin[i]._cnt*2*sizeof(void*));
160 _bin[i]._cnt = 0; // But leave bucket allocations alone
161 _cnt = d._cnt;
166 for( int j=0; j<b->_cnt; j++ )
182 for( int j=0; j<b->_cnt; j++ )
190 if( ++_cnt > _size ) { // Hash table is full
195 if( b->_cnt == b->_max ) { // Must grow bucket?
204 b->_keyvals[b->_cnt+b->_cnt ] = key;
205 b->_keyvals[b->_cnt+b->_cnt+1] = val;
206 b->_cnt++;
215 for( int j=0; j<b->_cnt; j++ )
218 b->_cnt--; // Remove key/value from lo bucket
219 b->_keyvals[j+j ] = b->_keyvals[b->_cnt+b->_cnt ];
220 b->_keyvals[j+j+1] = b->_keyvals[b->_cnt+b->_cnt+1];
221 _cnt--; // One less thing in table
233 for( int j=0; j<b->_cnt; j++ )
244 if( _cnt != d2._cnt ) return 0;
249 if( b->_cnt != d2._bin[i]._cnt ) return 0;
250 if( memcmp(b->_keyvals, d2._bin[i]._keyvals, b->_cnt*2*sizeof(void*) ) )
265 for( int j=0; j<b->_cnt; j++ ) {
348 _j = _d->_bin[_i]._cnt;