mirror of
https://github.com/Z3Prover/z3
synced 2025-11-12 09:02:04 +00:00
bugfixes
This commit is contained in:
parent
d774f07eb3
commit
f46c3782d6
4 changed files with 41 additions and 9 deletions
|
|
@ -37,6 +37,10 @@ namespace bv {
|
|||
bvect(unsigned sz) : svector(sz, (unsigned)0) {}
|
||||
void set_bw(unsigned bw);
|
||||
|
||||
void set(unsigned bit_idx, bool val) {
|
||||
auto _val = static_cast<digit_t>(0 - static_cast<digit_t>(val));
|
||||
get_bit_word(bit_idx) ^= (_val ^ get_bit_word(bit_idx)) & get_pos_mask(bit_idx);
|
||||
}
|
||||
|
||||
bool get(unsigned bit_idx) const {
|
||||
return (get_bit_word(bit_idx) & get_pos_mask(bit_idx)) != 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue