From 8dcd40c8f36fd4d9ed9dce2d49f8593a38c54bb3 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Wed, 28 Sep 2022 13:46:25 +0200 Subject: [PATCH] harmonized adjust_hash interface --- include/boost/unordered/detail/foa.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index 41ca6089..5f4e4fc0 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -293,7 +293,7 @@ private: static constexpr unsigned char available_=0, sentinel_=1; - inline static unsigned char adjust_hash(unsigned char hash) + inline static unsigned char adjust_hash(std::size_t hash) { static constexpr unsigned char table[]={ 2,3,2,3,4,5,6,7,8,9,10,11,12,13,14,15, @@ -314,7 +314,7 @@ private: 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255, }; - return table[hash]; + return table[(unsigned char)hash]; } /* copied from https://github.com/simd-everywhere/simde/blob/master/simde/x86/sse2.h#L3763 */