improve some conditions, as hinted by PVS-Studio

For #192.

* spot/twaalgos/ltl2tgba_fm.cc, spot/twaalgos/are_isomorphic.cc,
spot/taalgos/tgba2ta.cc: Here.
This commit is contained in:
Alexandre Duret-Lutz 2016-10-28 22:59:12 +02:00
parent 40b8bab890
commit 835b5ee1cf
3 changed files with 17 additions and 43 deletions

View file

@ -1781,15 +1781,11 @@ namespace spot
}
// Apply the fair-loop approximation if requested.
if (fair_loop_approx_)
{
if (fair_loop_approx_
// If the source cannot possibly be part of a fair
// loop, make all possible promises.
if (fair_loop_approx_
&& f != formula::tt()
&& !pflc_.check(f))
t.symbolic &= all_promises_;
}
&& !f.is_tt() && !pflc_.check(f))
t.symbolic &= all_promises_;
// Register the reverse mapping if it is not already done.
if (b2f_.find(t.symbolic) == b2f_.end())