streett_like: clear the pair vector when non Streett-like

When an acceptance condition is not Streett-like, is_streett_like
now clears the rs_pair vector parameter before returning. Fixes #270.

* spot/twa/acc.cc: Clear the pair vector.
* spot/twaalgos/totgba.cc: Stop calling streett_to_generalized_buchi()
  when the acceptance condition is not Streett-like.
This commit is contained in:
Thomas Medioni 2017-06-20 11:50:16 +02:00
parent 0a21a4c87e
commit fc609057d6
2 changed files with 17 additions and 8 deletions

View file

@ -331,8 +331,8 @@ namespace spot
}();
std::vector<acc_cond::rs_pair> pairs;
in->acc().is_streett_like(pairs);
if (min == 0 || min > pairs.size())
bool res = in->acc().is_streett_like(pairs);
if (!res || min == 0 || min > pairs.size())
return nullptr;
else
return streett_to_generalized_buchi(in);