From: Andrei Errapart Date: Mon, 24 Aug 2015 20:44:56 +0000 (+0200) Subject: Removed unnecessary cast. X-Git-Tag: yosys-0.6~170 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=522176c946b25557e754a3067fe2465e0d6df26c;p=yosys.git Removed unnecessary cast. --- diff --git a/kernel/bitpattern.h b/kernel/bitpattern.h index 288571d99..894a95ed1 100644 --- a/kernel/bitpattern.h +++ b/kernel/bitpattern.h @@ -30,7 +30,7 @@ struct BitPatternPool int width; struct bits_t { std::vector bitdata; - unsigned int cached_hash; + mutable unsigned int cached_hash; bits_t(int width = 0) : bitdata(width), cached_hash(0) { } RTLIL::State &operator[](int index) { return bitdata[index]; @@ -45,7 +45,7 @@ struct BitPatternPool } unsigned int hash() const { if (!cached_hash) - ((bits_t*)this)->cached_hash = hash_ops>::hash(bitdata); + cached_hash = hash_ops>::hash(bitdata); return cached_hash; } };