diff --git a/src/util/irep_hash_container.cpp b/src/util/irep_hash_container.cpp index 98ccf14ae40..c79d7a921ba 100644 --- a/src/util/irep_hash_container.cpp +++ b/src/util/irep_hash_container.cpp @@ -21,7 +21,7 @@ Function: irep_hash_container_baset::number \*******************************************************************/ -unsigned irep_hash_container_baset::number(const irept &irep) +size_t irep_hash_container_baset::number(const irept &irep) { // the ptr-hash provides a speedup of up to 3x @@ -32,7 +32,7 @@ unsigned irep_hash_container_baset::number(const irept &irep) packedt packed; pack(irep, packed); - unsigned id=numbering.number(packed); + size_t id=numbering.number(packed); ptr_hash[&irep.read()]=id; diff --git a/src/util/irep_hash_container.h b/src/util/irep_hash_container.h index 45894b9d79d..7e796ab6791 100644 --- a/src/util/irep_hash_container.h +++ b/src/util/irep_hash_container.h @@ -12,6 +12,7 @@ Author: Daniel Kroening, kroening@kroening.com #include // for size_t #include +#include "irep_hash.h" #include "numbering.h" class irept; @@ -19,9 +20,9 @@ class irept; class irep_hash_container_baset { public: - unsigned number(const irept &irep); + size_t number(const irept &irep); - irep_hash_container_baset(bool _full):full(_full) + explicit irep_hash_container_baset(bool _full):full(_full) { } @@ -36,7 +37,7 @@ class irep_hash_container_baset // this is the first level: address of the content - struct pointer_hash + struct pointer_hasht { inline size_t operator()(const void *p) const { @@ -44,25 +45,26 @@ class irep_hash_container_baset } }; - typedef std::unordered_map ptr_hasht; + typedef std::unordered_map + ptr_hasht; ptr_hasht ptr_hash; // this is the second level: content - typedef std::vector packedt; + typedef std::vector packedt; - struct vector_hash + struct vector_hasht { inline size_t operator()(const packedt &p) const { - size_t result=p.size(); - for(unsigned i=0; i numberingt; + typedef hash_numbering numberingt; numberingt numbering; void pack(const irept &irep, packedt &);