mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
rsx: Revert use of std::has_single_bit
- Zero is not a power of 2 in this situation, and we do not want to treat it as such
This commit is contained in:
parent
daa8265a47
commit
da3c9948e6
1 changed files with 2 additions and 2 deletions
|
@ -14,10 +14,10 @@ namespace utils
|
|||
return std::span<T>(bless<T>(span.data()), sizeof(U) * span.size() / sizeof(T));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T> requires(std::is_integral_v<T> && std::is_unsigned_v<T>)
|
||||
bool is_power_of_2(T value)
|
||||
{
|
||||
return std::has_single_bit(value);
|
||||
return !(value & (value - 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue