Fix warning
This commit is contained in:
1 parent
aae5f00dbd
commit
ab98577deb
1 file changed
+1
-1
+1
-1
@@ -174,7 +174,7 @@ bitset_set_at(bitset_t v, size_t i, bool x)
|
|||||||
const size_t index = i % BITSET_LIMB_BIT;
|
const size_t index = i % BITSET_LIMB_BIT;
|
||||||
// This is a branchless version as x can only be 0 or 1 with only one variable shift.
|
// This is a branchless version as x can only be 0 or 1 with only one variable shift.
|
||||||
const bitset_limb mask = ((bitset_limb)1)<<index;
|
const bitset_limb mask = ((bitset_limb)1)<<index;
|
||||||
v->ptr[offset] = (v->ptr[offset] & ~mask) | (mask & (-(bitset_limb)x));
|
v->ptr[offset] = (v->ptr[offset] & ~mask) | (mask & (0-(bitset_limb)x));
|
||||||
BITSETI_CONTRACT (v);
|
BITSETI_CONTRACT (v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user