Rework the 'down_cast' macro, closing #196.

* spot/misc/casts.hh: New inline functions and compile-time checks.
* spot/kripke/kripkegraph.hh, spot/ta/taexplicit.cc,
  spot/ta/taproduct.cc, spot/ta/tgtaproduct.cc, spot/taalgos/tgba2ta.cc,
  spot/twa/taatgba.hh, spot/twa/taatgba.cc, spot/twa/twagraph.hh,
  spot/twa/twaproduct.cc, spot/twaalgos/emptiness.cc,
  spot/twaalgos/stutter.cc, spot/ltsmin/ltsmin.cc, tests/core/ikwiad.cc,
  tests/core/ngraph.cc: Remove downcast checks from code.
This commit is contained in:
Maximilien Colange 2017-02-01 17:50:01 +01:00
parent 07a76e4d93
commit 3f5470898d
15 changed files with 143 additions and 89 deletions

View file

@ -1156,8 +1156,7 @@ checked_main(int argc, char** argv)
if (scc_filter && (reduction_dir_sim || reduction_rev_sim))
{
tm.start("SCC-filter post-sim");
auto aa = std::dynamic_pointer_cast<const spot::twa_graph>(a);
assert(aa);
auto aa = down_cast<spot::const_twa_graph_ptr>(a);
// Do not filter_all for SBA
a = spot::scc_filter(aa, assume_sba ?
false : scc_filter_all);