Changing the hashing in attributes to what Nodes do, i.e. hash on the id of the node...
authorDejan Jovanović <dejan.jovanovic@gmail.com>
Fri, 26 Feb 2010 02:25:52 +0000 (02:25 +0000)
committerDejan Jovanović <dejan.jovanovic@gmail.com>
Fri, 26 Feb 2010 02:25:52 +0000 (02:25 +0000)
src/expr/attribute.h

index c56725f18b03039ea3fafe87ba7c61c6d0479ee5..d7514d50ce6c3fe9193a7fb636affab4eabb0da6 100644 (file)
@@ -46,7 +46,7 @@ namespace attr {
 struct AttrHashFcn {
   enum { LARGE_PRIME = 32452843ul };
   std::size_t operator()(const std::pair<uint64_t, NodeValue*>& p) const {
-    return p.first * LARGE_PRIME + p.second->hash();
+    return p.first * LARGE_PRIME + p.second->getId();
   }
 };
 
@@ -57,7 +57,7 @@ struct AttrHashFcn {
  */
 struct AttrHashBoolFcn {
   std::size_t operator()(NodeValue* nv) const {
-    return nv->hash();
+    return (size_t)nv->getId();
   }
 };