* spot/misc/bitset.hh (operator-=): Simplify sightly.

This commit is contained in:
Alexandre Duret-Lutz 2021-07-05 14:15:34 +02:00
parent b01bc62f52
commit 058fdf1dc6

View file

@ -298,21 +298,17 @@ namespace spot
bitset& operator-=(word_t s) bitset& operator-=(word_t s)
{ {
for (auto& v : data) for (auto& v : data)
{ if (v >= s)
if (s == 0) {
v -= s;
s = 0;
break; break;
}
if (v >= s) else
{ {
v -= s; v -= s;
s = 0; s = 1;
} }
else
{
v -= s;
s = 1;
}
}
return *this; return *this;
} }