diff options
| author | practicalswift <[email protected]> | 2018-03-27 00:37:20 +0200 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2018-03-27 00:37:20 +0200 |
| commit | 9142dfea8181c6649c8d6a8775d53bc3e14de847 (patch) | |
| tree | 4b21eaacd9447c7224e3517870ef77a30ef1d546 | |
| parent | Merge #11962: [net] add seed.bitcoin.sprovoost.nl to DNS seeds (diff) | |
| download | discoin-9142dfea8181c6649c8d6a8775d53bc3e14de847.tar.xz discoin-9142dfea8181c6649c8d6a8775d53bc3e14de847.zip | |
Use explicit casting in cuckoocache's compute_hashes(...) to clarify integer conversion
| -rw-r--r-- | src/cuckoocache.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cuckoocache.h b/src/cuckoocache.h index d1de71202..15f687396 100644 --- a/src/cuckoocache.h +++ b/src/cuckoocache.h @@ -242,14 +242,14 @@ private: */ inline std::array<uint32_t, 8> compute_hashes(const Element& e) const { - return {{(uint32_t)((hash_function.template operator()<0>(e) * (uint64_t)size) >> 32), - (uint32_t)((hash_function.template operator()<1>(e) * (uint64_t)size) >> 32), - (uint32_t)((hash_function.template operator()<2>(e) * (uint64_t)size) >> 32), - (uint32_t)((hash_function.template operator()<3>(e) * (uint64_t)size) >> 32), - (uint32_t)((hash_function.template operator()<4>(e) * (uint64_t)size) >> 32), - (uint32_t)((hash_function.template operator()<5>(e) * (uint64_t)size) >> 32), - (uint32_t)((hash_function.template operator()<6>(e) * (uint64_t)size) >> 32), - (uint32_t)((hash_function.template operator()<7>(e) * (uint64_t)size) >> 32)}}; + return {{(uint32_t)(((uint64_t)hash_function.template operator()<0>(e) * (uint64_t)size) >> 32), + (uint32_t)(((uint64_t)hash_function.template operator()<1>(e) * (uint64_t)size) >> 32), + (uint32_t)(((uint64_t)hash_function.template operator()<2>(e) * (uint64_t)size) >> 32), + (uint32_t)(((uint64_t)hash_function.template operator()<3>(e) * (uint64_t)size) >> 32), + (uint32_t)(((uint64_t)hash_function.template operator()<4>(e) * (uint64_t)size) >> 32), + (uint32_t)(((uint64_t)hash_function.template operator()<5>(e) * (uint64_t)size) >> 32), + (uint32_t)(((uint64_t)hash_function.template operator()<6>(e) * (uint64_t)size) >> 32), + (uint32_t)(((uint64_t)hash_function.template operator()<7>(e) * (uint64_t)size) >> 32)}}; } /* end |