* spot/misc/bitvect.hh (is_subset_of): Fix implementation.
This commit is contained in:
parent
a32ccd649d
commit
7ea9454614
1 changed files with 2 additions and 2 deletions
|
|
@ -311,7 +311,7 @@ namespace spot
|
||||||
const size_t bpb = 8 * sizeof(bitvect::block_t);
|
const size_t bpb = 8 * sizeof(bitvect::block_t);
|
||||||
size_t rest = size() % bpb;
|
size_t rest = size() % bpb;
|
||||||
for (i = 0; i < block_count_ - !!rest; ++i)
|
for (i = 0; i < block_count_ - !!rest; ++i)
|
||||||
if ((storage_[i] & other.storage_[i]) != other.storage_[i])
|
if ((storage_[i] & other.storage_[i]) != storage_[i])
|
||||||
return false;
|
return false;
|
||||||
if (!rest)
|
if (!rest)
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -320,7 +320,7 @@ namespace spot
|
||||||
// relevant portion.
|
// relevant portion.
|
||||||
block_t mask = (1UL << rest) - 1;
|
block_t mask = (1UL << rest) - 1;
|
||||||
return ((storage_[i] & mask & other.storage_[i])
|
return ((storage_[i] & mask & other.storage_[i])
|
||||||
== (other.storage_[i] & mask));
|
== (storage_[i] & mask));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const bitvect& other) const
|
bool operator==(const bitvect& other) const
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue