diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-07-12 08:14:08 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-07-12 08:14:08 +0000 |
commit | 74f94e9b20c93b93ad8b9091474f6368fc79c697 (patch) | |
tree | 8840579769cb6d5796cc7e43fd239ffae39c8901 /src/hashtable.cpp | |
parent | b962c402b461e3249a1ee726ab3a33f019baecbf (diff) | |
download | libbu++-74f94e9b20c93b93ad8b9091474f6368fc79c697.tar.gz libbu++-74f94e9b20c93b93ad8b9091474f6368fc79c697.tar.bz2 libbu++-74f94e9b20c93b93ad8b9091474f6368fc79c697.tar.xz libbu++-74f94e9b20c93b93ad8b9091474f6368fc79c697.zip |
Added a clear function to the hashtable. How we made it this long without is
beyond me...
Diffstat (limited to '')
-rw-r--r-- | src/hashtable.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hashtable.cpp b/src/hashtable.cpp index d3f9f26..8a31f57 100644 --- a/src/hashtable.cpp +++ b/src/hashtable.cpp | |||
@@ -31,6 +31,11 @@ void HashTable::set( int j, const void *newID, const void *newData ) | |||
31 | aTable[j].data = newData; | 31 | aTable[j].data = newData; |
32 | } | 32 | } |
33 | 33 | ||
34 | void HashTable::clear() | ||
35 | { | ||
36 | memset( aTable, 0, sizeof(HashNode) * nTableSize ); | ||
37 | } | ||
38 | |||
34 | bool HashTable::isFilled( int j ) | 39 | bool HashTable::isFilled( int j ) |
35 | { | 40 | { |
36 | return (aTable[j].id != NULL)||(aTable[j].bDeleted); | 41 | return (aTable[j].id != NULL)||(aTable[j].bDeleted); |