Introduct a down_cast macro.
* src/misc/casts.hh: New file. * src/misc/Makefile.am: Add it. * iface/dve2/dve2.cc, iface/gspn/gspn.cc, iface/gspn/ssp.cc, src/evtgba/explicit.cc, src/evtgba/product.cc, src/misc/casts.hh, src/tgba/state.hh, src/tgba/statebdd.cc, src/tgba/taatgba.cc, src/tgba/taatgba.hh, src/tgba/tgbabddconcrete.cc, src/tgba/tgbaexplicit.cc, src/tgba/tgbaexplicit.hh, src/tgba/tgbakvcomplement.cc, src/tgba/tgbaproduct.cc, src/tgba/tgbasafracomplement.cc, src/tgba/tgbasgba.cc, src/tgba/tgbatba.cc, src/tgba/tgbaunion.cc, src/tgba/wdbacomp.cc, src/tgbaalgos/ndfs_result.hxx, src/tgbaalgos/reductgba_sim.cc, src/tgbaalgos/reductgba_sim_del.cc: Use down_cast when appropriate.
This commit is contained in:
parent
12783ff784
commit
9f63bb6637
25 changed files with 193 additions and 124 deletions
|
|
@ -70,7 +70,7 @@ namespace spot
|
|||
const spot::state* global_state,
|
||||
const tgba* global_automaton) const
|
||||
{
|
||||
const spot::state_set* s = dynamic_cast<const spot::state_set*>(state);
|
||||
const spot::state_set* s = down_cast<const spot::state_set*>(state);
|
||||
assert(s);
|
||||
(void) global_state;
|
||||
(void) global_automaton;
|
||||
|
|
@ -104,7 +104,7 @@ namespace spot
|
|||
bdd
|
||||
taa_tgba::compute_support_conditions(const spot::state* s) const
|
||||
{
|
||||
const spot::state_set* se = dynamic_cast<const spot::state_set*>(s);
|
||||
const spot::state_set* se = down_cast<const spot::state_set*>(s);
|
||||
assert(se);
|
||||
const state_set* ss = se->get_state();
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ namespace spot
|
|||
bdd
|
||||
taa_tgba::compute_support_variables(const spot::state* s) const
|
||||
{
|
||||
const spot::state_set* se = dynamic_cast<const spot::state_set*>(s);
|
||||
const spot::state_set* se = down_cast<const spot::state_set*>(s);
|
||||
assert(se);
|
||||
const state_set* ss = se->get_state();
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ namespace spot
|
|||
int
|
||||
state_set::compare(const spot::state* other) const
|
||||
{
|
||||
const state_set* o = dynamic_cast<const state_set*>(other);
|
||||
const state_set* o = down_cast<const state_set*>(other);
|
||||
assert(o);
|
||||
|
||||
const taa_tgba::state_set* s1 = get_state();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue