fix a bug and print predicate tree in xdot syntax
[c11tester.git] / hashtable.h
index 16744bb45f39e89a165bf12a804c96cad466123b..c9da5aad4341883bba7225f3bc97f1f2bd04fc9f 100644 (file)
@@ -62,7 +62,7 @@ inline bool default_equals(_Key key1, _Key key2) {
  * @tparam _free   Provide your own 'free' for the table, or default to
  *                 snapshotting.
  */
-template<typename _Key, typename _Val, typename _KeyInt, int _Shift = 0, void * (* _malloc)(size_t) = snapshot_malloc, void * (* _calloc)(size_t, size_t) = snapshot_calloc, void (*_free)(void *) = snapshot_free, unsigned int (*hash_function)(_Key) = default_hash_function<_Key, _Shift, _KeyInt>, bool (*equals)(_Key, _Key) = default_equals<_Key> >
+template<typename _Key, typename _Val, typename _KeyInt, int _Shift = 0, void * (*_malloc)(size_t) = snapshot_malloc, void * (*_calloc)(size_t, size_t) = snapshot_calloc, void (*_free)(void *) = snapshot_free, unsigned int (*hash_function)(_Key) = default_hash_function<_Key, _Shift, _KeyInt>, bool (*equals)(_Key, _Key) = default_equals<_Key> >
 class HashTable {
 public:
        /**
@@ -81,7 +81,7 @@ public:
                capacitymask = initialcapacity - 1;
 
                threshold = (unsigned int)(initialcapacity * loadfactor);
-               size = 0;                                                       // Initial number of elements in the hash
+               size = 0;       // Initial number of elements in the hash
        }
 
        /** @brief Hash table destructor */
@@ -327,7 +327,7 @@ public:
                        exit(EXIT_FAILURE);
                }
 
-               table = newtable;                                                                                       // Update the global hashtable upon resize()
+               table = newtable;       // Update the global hashtable upon resize()
                capacity = newsize;
                capacitymask = newsize - 1;
 
@@ -353,7 +353,7 @@ public:
                        search->val = bin->val;
                }
 
-               _free(oldtable);                                                                                                // Free the memory of the old hash table
+               _free(oldtable);        // Free the memory of the old hash table
        }
        double getLoadFactor() {return loadfactor;}
        unsigned int getCapacity() {return capacity;}
@@ -367,4 +367,4 @@ private:
        double loadfactor;
 };
 
-#endif/* __HASHTABLE_H__ */
+#endif /* __HASHTABLE_H__ */