Get rid of unnecessary hashfunction and comparison
authorbdemsky <bdemsky@uci.edu>
Wed, 30 Aug 2017 20:25:04 +0000 (13:25 -0700)
committerbdemsky <bdemsky@uci.edu>
Wed, 30 Aug 2017 20:25:04 +0000 (13:25 -0700)
src/Collections/structs.cc
src/Collections/structs.h

index 660005c..36f95b4 100644 (file)
@@ -56,12 +56,3 @@ unsigned int order_pair_hash_function(OrderPair *This) {
 bool order_pair_equals(OrderPair *key1, OrderPair *key2) {
        return key1->first == key2->first && key1->second == key2->second;
 }
-
-unsigned int order_hash_function(Order *This) {
-       return (uint) This;
-}
-
-bool order_pair_equals(Order *key1, Order *key2) {
-       return key1==key2;
-}
-
index afe905f..266fc17 100644 (file)
@@ -16,8 +16,6 @@ unsigned int order_element_hash_function(OrderElement *This);
 bool order_element_equals(OrderElement *key1, OrderElement *key2);
 unsigned int order_pair_hash_function(OrderPair *This);
 bool order_pair_equals(OrderPair *key1, OrderPair *key2);
-unsigned int order_hash_function(Order *This);
-bool order_pair_equals(Order *key1, Order *key2);
 
 
 typedef HashSet<Boolean *, uintptr_t, 4> HashSetBoolean;
@@ -28,7 +26,7 @@ typedef HashSet<OrderElement *, uintptr_t, 4, order_element_hash_function, order
 typedef HashTable<OrderNode *, HashSetOrderNode *, uintptr_t, 4> HashTableNodeToNodeSet;
 typedef HashTable<OrderPair *, OrderPair *, uintptr_t, 4, order_pair_hash_function, order_pair_equals> HashTableOrderPair;
 typedef HashTable<void *, void *, uintptr_t, 4> CloneMap;
-typedef HashTable<Order* , IntegerEncodingRecord*, uintptr_t, 4, order_hash_function, order_pair_equals> HashTableOrderIntegerEncoding; 
+typedef HashTable<Order* , IntegerEncodingRecord*, uintptr_t, 4> HashTableOrderIntegerEncoding; 
 
 typedef HSIterator<TableEntry *, uintptr_t, 4, table_entry_hash_function, table_entry_equals> HSIteratorTableEntry;
 typedef HSIterator<Boolean *, uintptr_t, 4> HSIteratorBoolean;