mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-06-08 00:23:52 +00:00
Fix ambiguous calls to safe_shift_left() in basisu_containers.h
Explicitly cast 1 to `uint64_t` to resolve overload ambiguity between `safe_shift_left(uint32_t, uint32_t)` and `safe_shift_left(uint64_t, uint32_t)`.
This commit is contained in:
@@ -3349,7 +3349,7 @@ namespace basisu
|
||||
|
||||
inline size_t hash_key(const Key& k) const
|
||||
{
|
||||
assert((safe_shift_left(1ULL, (SIZE_T_BITS - m_hash_shift))) == m_values.size());
|
||||
assert((safe_shift_left(static_cast<uint64_t>(1), (SIZE_T_BITS - m_hash_shift))) == m_values.size());
|
||||
|
||||
// Fibonacci hashing
|
||||
if (SIZE_T_BITS == 32)
|
||||
@@ -3433,7 +3433,7 @@ namespace basisu
|
||||
return false;
|
||||
|
||||
new_map.m_hash_shift = SIZE_T_BITS - helpers::floor_log2i((uint64_t)new_hash_size);
|
||||
assert(new_hash_size == safe_shift_left(1ULL, SIZE_T_BITS - new_map.m_hash_shift));
|
||||
assert(new_hash_size == safe_shift_left(static_cast<uint64_t>(1), SIZE_T_BITS - new_map.m_hash_shift));
|
||||
|
||||
new_map.m_grow_threshold = std::numeric_limits<size_t>::max();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user