From f7365a9122fbe2ccd580b98a39774fbb752b42c9 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 7 Jul 2000 04:20:28 +0000 Subject: Made PropSet into a hash table. --- include/PropSet.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'include/PropSet.h') diff --git a/include/PropSet.h b/include/PropSet.h index ed580ee96..16b460ed8 100644 --- a/include/PropSet.h +++ b/include/PropSet.h @@ -107,21 +107,18 @@ public: } }; -unsigned int HashString(const char *s); - struct Property { unsigned int hash; char *key; char *val; - Property() : hash(0), key(0), val(0) {} + Property *next; + Property() : hash(0), key(0), val(0), next(0) {} }; class PropSet { private: - Property *properties; - int size; - int used; - void EnsureCanAddEntry(); + enum { hashRoots=31 }; + Property *props[hashRoots]; public: PropSet *superPS; PropSet(); -- cgit v1.2.3