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:
Alexandre Duret-Lutz 2011-03-31 19:39:44 +02:00
parent 12783ff784
commit 9f63bb6637
25 changed files with 193 additions and 124 deletions

View file

@ -137,7 +137,7 @@ namespace spot
state_kv_complement::compare(const state* o) const
{
const state_kv_complement* other =
dynamic_cast<const state_kv_complement*>(o);
down_cast<const state_kv_complement*>(o);
if (other == 0)
return 1;
@ -632,7 +632,7 @@ namespace spot
const tgba*) const
{
const state_kv_complement* state =
dynamic_cast<const state_kv_complement*>(local_state);
down_cast<const state_kv_complement*>(local_state);
assert(state);
return new tgba_kv_complement_succ_iterator(automaton_,
@ -650,7 +650,7 @@ namespace spot
tgba_kv_complement::format_state(const state* state) const
{
const state_kv_complement* s =
dynamic_cast<const state_kv_complement*>(state);
down_cast<const state_kv_complement*>(state);
assert(s);
std::ostringstream ss;
ss << "{ set: {" << std::endl;