diff options
Diffstat (limited to '')
-rw-r--r-- | includes/compiler/BitVector.h (renamed from includes/compiler/IroBitVect.h) | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/compiler/IroBitVect.h b/includes/compiler/BitVector.h index 7bbca22..f8f8143 100644 --- a/includes/compiler/IroBitVect.h +++ b/includes/compiler/BitVector.h @@ -25,11 +25,13 @@ extern Boolean Bv_IsEmpty(const BitVector *bv); inline void Bv_SetBit(UInt32 bit, BitVector *bv) { if ((bit / 32) < bv->size) { - bv->data[bit / 32] |= ~(1 << (bit & 31)); + bv->data[bit / 32] |= 1 << (bit & 31); } else { #line 56 CError_FATAL(); } } +#define Bv_IsBitSet(_bit, _bv) ( (((_bit) >> 5) < (_bv)->size) && ((_bv)->data[(_bit) >> 5] & (1 << ((_bit) & 31))) ) + #endif |