mirror of https://github.com/YosysHQ/yosys.git
hashlib: Add a hash for bool.
This commit is contained in:
parent
5488c69d2a
commit
dbfd0b61e3
|
@ -66,6 +66,12 @@ struct hash_int_ops {
|
|||
}
|
||||
};
|
||||
|
||||
template<> struct hash_ops<bool> : hash_int_ops
|
||||
{
|
||||
static inline unsigned int hash(bool a) {
|
||||
return a ? 1 : 0;
|
||||
}
|
||||
};
|
||||
template<> struct hash_ops<int32_t> : hash_int_ops
|
||||
{
|
||||
static inline unsigned int hash(int32_t a) {
|
||||
|
|
Loading…
Reference in New Issue