]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Implement default constructor for hash_link
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 24 Sep 2015 05:26:38 +0000 (22:26 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 24 Sep 2015 05:26:38 +0000 (22:26 -0700)
include/hash.h

index fd8e4faa5c0a63c1861a500ce03167053d283f6c..3b1c6c69beaa04dce005e09e9651a26010705442 100644 (file)
 typedef void HASHFREE(void *);
 typedef int HASHCMP(const void *, const void *);
 typedef unsigned int HASHHASH(const void *, unsigned int);
-typedef struct _hash_link hash_link;
-typedef struct _hash_table hash_table;
 
-struct _hash_link {
+class hash_link {
+public:
+    hash_link() : key(NULL), next(NULL) {}
     void *key;
     hash_link *next;
 };
 
-struct _hash_table {
+class hash_table {
+public:
     hash_link **buckets;
     HASHCMP *cmp;
     HASHHASH *hash;