diff options
author | Andrei Errapart <andrei@errapartengineering.com> | 2015-08-24 22:44:56 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-09-01 12:40:36 +0200 |
commit | 522176c946b25557e754a3067fe2465e0d6df26c (patch) | |
tree | 1bbe04e0759e78ff92c422dfe369885c071d430f /kernel/bitpattern.h | |
parent | 09176bcf3f48f3b7d56ba6a176b273c086fea791 (diff) | |
download | yosys-522176c946b25557e754a3067fe2465e0d6df26c.tar.gz yosys-522176c946b25557e754a3067fe2465e0d6df26c.tar.bz2 yosys-522176c946b25557e754a3067fe2465e0d6df26c.zip |
Removed unnecessary cast.
Diffstat (limited to 'kernel/bitpattern.h')
-rw-r--r-- | kernel/bitpattern.h | 4 |
1 files changed, 2 insertions, 2 deletions
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<RTLIL::State> 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<std::vector<RTLIL::State>>::hash(bitdata); + cached_hash = hash_ops<std::vector<RTLIL::State>>::hash(bitdata); return cached_hash; } }; |