mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
Use explicit casting in cuckoocache's compute_hashes(...) to clarify integer conversion
This commit is contained in:
parent
0a018431c4
commit
9142dfea81
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user