]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Implement default constructor for hash_link.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 21 Sep 2015 13:48:18 +0000 (15:48 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 21 Sep 2015 13:48:18 +0000 (15:48 +0200)
include/hash.h

index fd8e4faa5c0a63c1861a500ce03167053d283f6c..0c8c32b1c5e0290e6286fae503c56863ad38a148 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(nullptr), next(nullptr) {}
     void *key;
     hash_link *next;
 };
 
-struct _hash_table {
+class hash_table {
+public:
     hash_link **buckets;
     HASHCMP *cmp;
     HASHHASH *hash;