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
|
|
@ -67,7 +67,7 @@ namespace spot
|
|||
compare(const state* other) const
|
||||
{
|
||||
const state_sgba_proxy* o =
|
||||
dynamic_cast<const state_sgba_proxy*>(other);
|
||||
down_cast<const state_sgba_proxy*>(other);
|
||||
assert(o);
|
||||
int res = s_->compare(o->real_state());
|
||||
if (res != 0)
|
||||
|
|
@ -198,7 +198,7 @@ namespace spot
|
|||
const tgba* global_automaton) const
|
||||
{
|
||||
const state_sgba_proxy* s =
|
||||
dynamic_cast<const state_sgba_proxy*>(local_state);
|
||||
down_cast<const state_sgba_proxy*>(local_state);
|
||||
assert(s);
|
||||
|
||||
tgba_succ_iterator* it = a_->succ_iter(s->real_state(),
|
||||
|
|
@ -216,7 +216,7 @@ namespace spot
|
|||
std::string
|
||||
tgba_sgba_proxy::format_state(const state* state) const
|
||||
{
|
||||
const state_sgba_proxy* s = dynamic_cast<const state_sgba_proxy*>(state);
|
||||
const state_sgba_proxy* s = down_cast<const state_sgba_proxy*>(state);
|
||||
assert(s);
|
||||
std::string a;
|
||||
if (!emulate_acc_cond_)
|
||||
|
|
@ -248,7 +248,7 @@ namespace spot
|
|||
tgba_sgba_proxy::state_acceptance_conditions(const state* state) const
|
||||
{
|
||||
const state_sgba_proxy* s =
|
||||
dynamic_cast<const state_sgba_proxy*>(state);
|
||||
down_cast<const state_sgba_proxy*>(state);
|
||||
assert(s);
|
||||
if (emulate_acc_cond_)
|
||||
return acceptance_condition_;
|
||||
|
|
@ -259,7 +259,7 @@ namespace spot
|
|||
tgba_sgba_proxy::compute_support_conditions(const state* state) const
|
||||
{
|
||||
const state_sgba_proxy* s =
|
||||
dynamic_cast<const state_sgba_proxy*>(state);
|
||||
down_cast<const state_sgba_proxy*>(state);
|
||||
assert(s);
|
||||
|
||||
if (emulate_acc_cond_)
|
||||
|
|
@ -271,7 +271,7 @@ namespace spot
|
|||
tgba_sgba_proxy::compute_support_variables(const state* state) const
|
||||
{
|
||||
const state_sgba_proxy* s =
|
||||
dynamic_cast<const state_sgba_proxy*>(state);
|
||||
down_cast<const state_sgba_proxy*>(state);
|
||||
assert(s);
|
||||
|
||||
if (emulate_acc_cond_)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue