a few improvements to mark_t
* spot/misc/bitset.hh: add methods set() and clear() * spot/twa/acc.hh: deprecate comparison of mark_t with unsigned, and rely more on biset for efficiency
This commit is contained in:
parent
88a6bd82a3
commit
5b9088006c
2 changed files with 17 additions and 5 deletions
|
|
@ -124,6 +124,18 @@ namespace spot
|
|||
return other.operator<=(*this);
|
||||
}
|
||||
|
||||
void set(unsigned s)
|
||||
{
|
||||
SPOT_ASSERT(s < 8*N*sizeof(word_t));
|
||||
data[s / (8*sizeof(word_t))] |= 1U << (s % (8*sizeof(word_t)));
|
||||
}
|
||||
|
||||
void clear(unsigned s)
|
||||
{
|
||||
SPOT_ASSERT(s < 8*N*sizeof(word_t));
|
||||
data[s / (8*sizeof(word_t))] &= ~(1U << (s % (8*sizeof(word_t))));
|
||||
}
|
||||
|
||||
bitset operator<<(unsigned s) const
|
||||
{
|
||||
bitset r = *this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue