diff options
author | Antonin Kral <a.kral@bobek.cz> | 2011-09-14 17:08:06 +0200 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2011-09-14 17:08:06 +0200 |
commit | 5d342a758c6095b4d30aba0750b54f13b8916f51 (patch) | |
tree | 762e9aa84781f5e3b96db2c02d356c29cf0217c0 /util/hashtab.h | |
parent | cbe2d992e9cd1ea66af9fa91df006106775d3073 (diff) | |
download | mongodb-5d342a758c6095b4d30aba0750b54f13b8916f51.tar.gz |
Imported Upstream version 2.0.0
Diffstat (limited to 'util/hashtab.h')
-rw-r--r-- | util/hashtab.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util/hashtab.h b/util/hashtab.h index 6818bef..f1a3306 100644 --- a/util/hashtab.h +++ b/util/hashtab.h @@ -54,7 +54,7 @@ namespace mongo { } }; void* _buf; - int n; + int n; // number of hashtable buckets int maxChain; Node& nodes(int i) { @@ -156,9 +156,9 @@ namespace mongo { typedef void (*IteratorCallback)( const Key& k , Type& v ); void iterAll( IteratorCallback callback ) { for ( int i=0; i<n; i++ ) { - if ( ! nodes(i).inUse() ) - continue; - callback( nodes(i).k , nodes(i).value ); + if ( nodes(i).inUse() ) { + callback( nodes(i).k , nodes(i).value ); + } } } @@ -166,9 +166,9 @@ namespace mongo { typedef void (*IteratorCallback2)( const Key& k , Type& v , void * extra ); void iterAll( IteratorCallback2 callback , void * extra ) { for ( int i=0; i<n; i++ ) { - if ( ! nodes(i).inUse() ) - continue; - callback( nodes(i).k , nodes(i).value , extra ); + if ( nodes(i).inUse() ) { + callback( nodes(i).k , nodes(i).value , extra ); + } } } |