* 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 (s == 0)
break;
if (v >= s) if (v >= s)
{ {
v -= s; v -= s;
s = 0; s = 0;
break;
} }
else else
{ {
v -= s; v -= s;
s = 1; s = 1;
} }
}
return *this; return *this;
} }