defaultenv: simplify usage

* src/ltlenv/defaultenv.hh, src/ltlenv/defaultenv.cc (require): Return
an atomic_prop*, not a formula*.
* src/bin/randaut.cc, src/bin/randltl.cc, src/ltlvisit/apcollect.cc,
src/tgbatest/ltl2tgba.cc, src/tgbatest/randtgba.cc: Do not cast
the return of require().
This commit is contained in:
Alexandre Duret-Lutz 2014-11-30 19:53:14 +01:00
parent e6e416e1e1
commit 4f1535c8fe
7 changed files with 12 additions and 20 deletions

View file

@ -386,7 +386,7 @@ checked_main(int argc, char** argv)
bool opt_stutterize = false;
bool spin_comments = false;
const char* hoa_opt = 0;
spot::ltl::environment& env(spot::ltl::default_environment::instance());
auto& env = spot::ltl::default_environment::instance();
spot::ltl::atomic_prop_set* unobservables = 0;
spot::tgba_ptr system_aut = 0;
auto dict = spot::make_bdd_dict();
@ -846,8 +846,7 @@ checked_main(int argc, char** argv)
const char* tok = strtok(argv[formula_index] + 2, ", \t;");
while (tok)
{
unobservables->insert
(static_cast<const spot::ltl::atomic_prop*>(env.require(tok)));
unobservables->insert(env.require(tok));
tok = strtok(0, ", \t;");
}
}