Fix bitwise NOT operator on BitMap's set_bit
This commit is contained in:
parent
c037f6339f
commit
c73589305e
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ void BitMap::set_bit_rect(const Rect2 &p_rect, bool p_value) {
|
||||||
if (p_value)
|
if (p_value)
|
||||||
b |= (1 << bbit);
|
b |= (1 << bbit);
|
||||||
else
|
else
|
||||||
b &= !(1 << bbit);
|
b &= ~(1 << bbit);
|
||||||
|
|
||||||
data[bbyte] = b;
|
data[bbyte] = b;
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ void BitMap::set_bit(const Point2 &p_pos, bool p_value) {
|
||||||
if (p_value)
|
if (p_value)
|
||||||
b |= (1 << bbit);
|
b |= (1 << bbit);
|
||||||
else
|
else
|
||||||
b &= !(1 << bbit);
|
b &= ~(1 << bbit);
|
||||||
|
|
||||||
bitmask[bbyte] = b;
|
bitmask[bbyte] = b;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue