From c38c6ebe9778244e17544de9067ff35f4ed43906 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 14 Nov 2007 15:22:18 +0000 Subject: Thought that a Bu::Hash::getValues() function would be nice to match Bu::Hash::getKeys(). --- src/hash.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/hash.h b/src/hash.h index 04f2657..1b53001 100644 --- a/src/hash.h +++ b/src/hash.h @@ -776,6 +776,24 @@ namespace Bu return lKeys; } + + Bu::List getValues() const + { + Bu::List lValues; + + for( uint32_t j = 0; j < nCapacity; j++ ) + { + if( isFilled( j ) ) + { + if( !isDeleted( j ) ) + { + lValues.append( aValues[j] ); + } + } + } + + return lValues; + } protected: virtual void onInsert() {} -- cgit v1.2.3