taproduct: fix incorrect assert() flagged by PVS-Studio
For #192. * spot/ta/taproduct.cc: Check the output of down_cast, not its input.
This commit is contained in:
parent
d0112a7b8a
commit
26e94b774f
1 changed files with 4 additions and 5 deletions
|
|
@ -297,9 +297,8 @@ namespace spot
|
||||||
ta_succ_iterator_product*
|
ta_succ_iterator_product*
|
||||||
ta_product::succ_iter(const state* s) const
|
ta_product::succ_iter(const state* s) const
|
||||||
{
|
{
|
||||||
const state_ta_product* stp = down_cast<const state_ta_product*> (s);
|
const state_ta_product* stp = down_cast<const state_ta_product*>(s);
|
||||||
assert(s);
|
assert(stp);
|
||||||
|
|
||||||
return new ta_succ_iterator_product(stp, ta_.get(), kripke_.get());
|
return new ta_succ_iterator_product(stp, ta_.get(), kripke_.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -307,8 +306,8 @@ namespace spot
|
||||||
ta_succ_iterator_product*
|
ta_succ_iterator_product*
|
||||||
ta_product::succ_iter(const spot::state* s, bdd changeset) const
|
ta_product::succ_iter(const spot::state* s, bdd changeset) const
|
||||||
{
|
{
|
||||||
const state_ta_product* stp = down_cast<const state_ta_product*> (s);
|
const state_ta_product* stp = down_cast<const state_ta_product*>(s);
|
||||||
assert(s);
|
assert(stp);
|
||||||
return new ta_succ_iterator_product_by_changeset(stp,
|
return new ta_succ_iterator_product_by_changeset(stp,
|
||||||
ta_.get(), kripke_.get(),
|
ta_.get(), kripke_.get(),
|
||||||
changeset);
|
changeset);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue