From 145a1235225ebab6d7ced18f54da733561400b59 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 26 Jun 2007 21:06:15 +0000 Subject: [PATCH] compiler warnings --- panda/src/putil/bitMask.I | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/putil/bitMask.I b/panda/src/putil/bitMask.I index ecbbd4892a..4b737eec5d 100644 --- a/panda/src/putil/bitMask.I +++ b/panda/src/putil/bitMask.I @@ -477,7 +477,7 @@ get_lowest_on_bit() const { return -1; } - WordType w = (_word & -_word); + WordType w = (_word & (~_word + 1)); return count_bits_in_word(w - 1); } @@ -558,7 +558,7 @@ get_next_higher_different_bit(int low_bit) const { } else { // Now determine the lowest 1 bit in the remaining word. This // operation will clear out all bits except for the lowest 1 bit. - w = (w & -w); + w = (w & (~w + 1)); // And the answer is the number of bits in (w - 1). return count_bits_in_word(w - 1) + low_bit + 1;