summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools.c b/tools.c
index 46d3ce2..28b2bbe 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.97 2005/08/27 14:43:55 kls Exp $
+ * $Id: tools.c 1.98 2005/09/11 13:11:05 kls Exp $
*/
#include "tools.h"
@@ -1080,8 +1080,7 @@ cHashBase::cHashBase(int Size)
cHashBase::~cHashBase(void)
{
- for (int i = 0; i < size; i++)
- delete hashTable[i];
+ Clear();
free(hashTable);
}
@@ -1106,6 +1105,14 @@ void cHashBase::Del(cListObject *Object, unsigned int Id)
}
}
+void cHashBase::Clear(void)
+{
+ for (int i = 0; i < size; i++) {
+ delete hashTable[i];
+ hashTable[i] = NULL;
+ }
+}
+
cListObject *cHashBase::Get(unsigned int Id) const
{
cList<cHashObject> *list = hashTable[hashfn(Id)];