Missing 32bit case.
This commit is contained in:
committed by
Matthew Parkinson
parent
dc36849dd0
commit
3adfe00f51
@@ -82,6 +82,10 @@ namespace snmalloc
|
||||
{
|
||||
return static_cast<size_t>(__builtin_clzll(x));
|
||||
}
|
||||
else if constexpr (std::is_same_v<unsigned int, std::size_t>)
|
||||
{
|
||||
return static_cast<size_t>(__builtin_clz(x));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -159,6 +163,10 @@ namespace snmalloc
|
||||
{
|
||||
return static_cast<size_t>(__builtin_ctzll(x));
|
||||
}
|
||||
else if constexpr (std::is_same_v<unsigned int, std::size_t>)
|
||||
{
|
||||
return static_cast<size_t>(__builtin_ctz(x));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user