bloemen: avoid tail-recursive calls

* spot/mc/bloemen.hh: here.
This commit is contained in:
Etienne Renault 2018-03-28 16:31:05 +02:00
parent ae101a509f
commit 73ccf2216d

View file

@ -160,6 +160,8 @@ namespace spot
}
bool sameset(uf_element* a, uf_element* b)
{
while (true)
{
uf_element* a_root = find(a);
uf_element* b_root = find(b);
@ -168,8 +170,7 @@ namespace spot
if (a_root->parent.load() == a_root)
return false;
return sameset(a_root, b_root);
}
}
bool lock_root(uf_element* a)