twagraph: fix highlight-edges in defrag_states
Fixes #555 reported by Dávid Smolka. * spot/twa/twagraph.cc (defrag_states): Update highlight-edge. * spot/graph/graph.hh (defrag_states): Just point to twa_graph::defrag_states in a comment, because the latter relies on the implementation detail of graph::defrag_state. * tests/python/parsetgba.py: Add test case. * NEWS: Mention the bug.
This commit is contained in:
parent
193fdd6f95
commit
55575a11e3
4 changed files with 66 additions and 0 deletions
|
|
@ -1485,6 +1485,11 @@ namespace spot
|
|||
// Shift all edges in edges_. The algorithm is
|
||||
// similar to remove_if, but it also keeps the correspondence
|
||||
// between the old and new index as newidx[old] = new.
|
||||
//
|
||||
// If you change anything to this logic, you might want to
|
||||
// double check twa_graph::defrag_states where we need to
|
||||
// predict the new edges indices in order to update
|
||||
// highlight-edges.
|
||||
unsigned tend = edges_.size();
|
||||
std::vector<edge> newidx(tend);
|
||||
unsigned dest = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue