From: Dejan Jovanović Date: Fri, 26 Feb 2010 02:25:52 +0000 (+0000) Subject: Changing the hashing in attributes to what Nodes do, i.e. hash on the id of the node... X-Git-Tag: cvc5-1.0.0~9219 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=73265c6f26b735894375aa9d793d7165848b16e7;p=cvc5.git Changing the hashing in attributes to what Nodes do, i.e. hash on the id of the node-value. This keeps coming up so we should rename the .hash() method in the node-value to something else. Morgan, feel free to change, but I had to go in as we were stuck on infinite parsing again. --- diff --git a/src/expr/attribute.h b/src/expr/attribute.h index c56725f18..d7514d50c 100644 --- a/src/expr/attribute.h +++ b/src/expr/attribute.h @@ -46,7 +46,7 @@ namespace attr { struct AttrHashFcn { enum { LARGE_PRIME = 32452843ul }; std::size_t operator()(const std::pair& 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(); } };