mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +00:00
util-math: Fix is_power_of_two_loop for non-64-bit types
This commit is contained in:
parent
6e03f2334d
commit
bc89eaf33a
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ namespace util {
|
|||
inline bool is_power_of_two_loop(T v)
|
||||
{
|
||||
bool have_bit = false;
|
||||
for (size_t index = 63; index >= 0; index--) {
|
||||
for (size_t index = 0; index < (sizeof(T) * 8); index++) {
|
||||
bool cur = (v & (1ull << index)) != 0;
|
||||
if (cur) {
|
||||
if (have_bit)
|
||||
|
|
Loading…
Reference in a new issue