Merge pull request #387 from Chubercik/ambiguity_fix

Fix ambiguous calls to `safe_shift_left()` in `basisu_containers.h`
This commit is contained in:
Rich Geldreich
2025-06-18 21:38:26 -04:00
committed by GitHub

View File

@@ -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();