From: Marcelina Koƛcielnicka Date: Mon, 24 May 2021 19:27:29 +0000 (+0200) Subject: hashlib: Add a hash for bool. X-Git-Tag: yosys-0.10~185 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dbfd0b61e378dd8c0e0f64205756ed7919de083c;p=yosys.git hashlib: Add a hash for bool. --- diff --git a/kernel/hashlib.h b/kernel/hashlib.h index a523afadd..42fb8d363 100644 --- a/kernel/hashlib.h +++ b/kernel/hashlib.h @@ -66,6 +66,12 @@ struct hash_int_ops { } }; +template<> struct hash_ops : hash_int_ops +{ + static inline unsigned int hash(bool a) { + return a ? 1 : 0; + } +}; template<> struct hash_ops : hash_int_ops { static inline unsigned int hash(int32_t a) {