c++11: introduce tgba::succ(s) to replace tgba::succ_iter(s).
| tgba_succ_iterator* i = aut->succ_iter(s);
| for (i->begin(); !i->done(); i->next())
| {
| // ...
| }
| delete i;
becomes
| for (auto i: aut->succ(s))
| {
| // ...
| }
hiding the begin()/done()/next() interface, taking care of the delete,
and allowing more optimization to come.
* src/tgba/succiter.hh, src/tgba/tgba.hh: Implement the above
new interface.
* iface/gspn/ssp.cc, src/dstarparse/nsa2tgba.cc,
src/saba/sabacomplementtgba.cc, src/tgba/tgbakvcomplement.cc,
src/tgba/tgbamask.cc, src/tgba/tgbasafracomplement.cc,
src/tgba/tgbatba.cc, src/tgbaalgos/compsusp.cc, src/tgbaalgos/cutscc.cc,
src/tgbaalgos/degen.cc, src/tgbaalgos/emptiness.cc,
src/tgbaalgos/isdet.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/minimize.cc, src/tgbaalgos/powerset.cc,
src/tgbaalgos/safety.cc, src/tgbaalgos/simulation.cc,
src/tgbaalgos/tau03.cc, src/tgbatest/explicit2.cc: Update for
loops.
This commit is contained in:
parent
f59773e3c7
commit
487cd01d9f
21 changed files with 418 additions and 522 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2011, 2013 Laboratoire de Recherche et Developpement de
|
||||
// l'Epita (LRDE).
|
||||
// Copyright (C) 2011, 2013, 2014 Laboratoire de Recherche et
|
||||
// Developpement de l'Epita (LRDE).
|
||||
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
|
|
@ -189,8 +189,7 @@ namespace spot
|
|||
<< std::endl;
|
||||
typename heap::color_ref c = h.get_color_ref(f.s);
|
||||
assert(!c.is_white());
|
||||
tgba_succ_iterator* i = a_->succ_iter(f.s);
|
||||
for (i->first(); !i->done(); i->next())
|
||||
for (auto i: a_->succ(f.s))
|
||||
{
|
||||
inc_transitions();
|
||||
const state *s_prime = i->current_state();
|
||||
|
|
@ -211,7 +210,6 @@ namespace spot
|
|||
dfs_red(acu);
|
||||
}
|
||||
}
|
||||
delete i;
|
||||
if (c.get_acc() == all_cond)
|
||||
{
|
||||
trace << "DFS_BLUE propagation is successful, report a"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue