rearrange some code to trigger less warning from PVS-Studio

For #192.

* spot/tl/formula.cc: Avoid calling twice the same function.
* spot/twaalgos/gtec/gtec.cc: Do not shadow a member variable.
This commit is contained in:
Alexandre Duret-Lutz 2016-10-28 23:00:52 +02:00
parent 835b5ee1cf
commit 65955b44d9
2 changed files with 11 additions and 9 deletions

View file

@ -1276,8 +1276,9 @@ namespace spot
else
{
is_.syntactic_safety = false;
is_.syntactic_obligation = children[1]->is_syntactic_guarantee();
is_.syntactic_recurrence = children[1]->is_syntactic_guarantee();
bool g = children[1]->is_syntactic_guarantee();
is_.syntactic_obligation = g;
is_.syntactic_recurrence = g;
}
assert(children[0]->is_sere_formula());
assert(children[1]->is_psl_formula());
@ -1305,8 +1306,9 @@ namespace spot
else
{
is_.syntactic_guarantee = false;
is_.syntactic_obligation = children[1]->is_syntactic_safety();
is_.syntactic_persistence = children[1]->is_syntactic_safety();
bool s = children[1]->is_syntactic_safety();
is_.syntactic_obligation = s;
is_.syntactic_persistence = s;
}
assert(children[0]->is_sere_formula());
assert(children[1]->is_psl_formula());