summaryrefslogtreecommitdiff
path: root/src/ast/bits.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/bits.h')
-rw-r--r--src/ast/bits.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ast/bits.h b/src/ast/bits.h
index 102ce30e0..d88cb5edb 100644
--- a/src/ast/bits.h
+++ b/src/ast/bits.h
@@ -31,8 +31,8 @@ struct Bits {
// checks if the input is a mask of lower bits, i.e., all 1s up to some high bit, and all zeros
// from there. returns the number of masked bits, or 0 if this is not such a mask
- static uint32_t getMaskedBits(int32_t mask) {
- if (mask == -1) return 32; // all the bits
+ static uint32_t getMaskedBits(uint32_t mask) {
+ if (mask == uint32_t(-1)) return 32; // all the bits
if (mask == 0) return 0; // trivially not a mask
// otherwise, see if adding one turns this into a 1-bit thing, 00011111 + 1 => 00100000
if (PopCount(mask + 1) != 1) return 0;