From 57cda2d9c3406fa7684b52afb6b8e6fb294a5557 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sun, 1 Feb 2015 17:16:24 +0100 Subject: [PATCH] * src/dstarparse/nra2nba.cc: Simplify construction of initial state. --- src/dstarparse/nra2nba.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/dstarparse/nra2nba.cc b/src/dstarparse/nra2nba.cc index 25703cdc3..4a2c5c25c 100644 --- a/src/dstarparse/nra2nba.cc +++ b/src/dstarparse/nra2nba.cc @@ -35,7 +35,7 @@ namespace spot class nra_to_nba_worker: public tgba_reachable_iterator_depth_first { public: - // AUT is the automate we iterate on, while A is the automaton + // AUT is the automaton we iterate on, while A is the automaton // we read the acceptance conditions from. Separating the two // makes its possible to mask AUT, as needed in dra_to_ba(). nra_to_nba_worker(const const_dstar_aut_ptr& a, const_tgba_ptr aut): @@ -48,10 +48,7 @@ namespace spot out_->set_single_acceptance_set(); out_->prop_state_based_acc(); out_->new_states(num_states_ * (d_->accpair_count + 1)); - - auto i = aut->get_init_state(); - out_->set_init_state(a->aut->state_number(i)); - i->destroy(); + out_->set_init_state(a->aut->get_init_state_number()); } tgba_digraph_ptr