never iterate on the edge_vector()
This fixes #552, reported by Rüdiger and Ayrat. * tests/sanity/style.test: Warn aginst iterations on edge_vector. * spot/parseaut/parseaut.yy, spot/twaalgos/complete.cc, spot/twaalgos/parity.cc: Iterate over edges(), not edge_vector(). * tests/core/ltlcross.test: Add a test case for #552. * NEWS: Mention the bug.
This commit is contained in:
parent
313e43c84b
commit
205df01390
6 changed files with 27 additions and 7 deletions
|
|
@ -144,7 +144,7 @@ namespace spot
|
|||
if (need_acc_fix)
|
||||
{
|
||||
auto a = aut->set_buchi();
|
||||
for (auto& t: aut->edge_vector())
|
||||
for (auto& t: aut->edges())
|
||||
t.acc = a;
|
||||
if (aut->num_edges())
|
||||
acc = a;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace spot
|
|||
change_acc(twa_graph_ptr& aut, unsigned num_sets, bool change_kind,
|
||||
bool change_style, bool output_max, bool input_max)
|
||||
{
|
||||
for (auto& e: aut->edge_vector())
|
||||
for (auto& e: aut->edges())
|
||||
if (e.acc)
|
||||
{
|
||||
unsigned msb = (input_max ? e.acc.max_set() : e.acc.min_set()) - 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue