tgba: simplify usage of named properties

* src/tgba/tgba.hh, src/tgba/tgba.cc (set_named_prop): Add a template
version.
(get_named_prop): Hide the old version, and supply a template version
that casts.
* src/bin/ltlcross.cc, src/hoaparse/hoaparse.yy, src/tgbaalgos/hoa.cc,
src/tgbaalgos/product.cc: Adjust usage.
This commit is contained in:
Alexandre Duret-Lutz 2014-12-09 16:20:12 +01:00
parent 5a1e38d90f
commit 61edf7f41d
6 changed files with 23 additions and 12 deletions

View file

@ -1244,8 +1244,7 @@ namespace
state_set& s)
{
auto aut = m->get_aut();
auto ps = static_cast<const spot::product_states*>
(aut->get_named_prop("product-states"));
auto ps = aut->get_named_prop<const spot::product_states>("product-states");
unsigned c = m->scc_count();
for (unsigned n = 0; n < c; ++n)
if (m->is_accepting_scc(n) || m->is_trivial(n))