Commit d7fa7f48 authored by Etienne Renault's avatar Etienne Renault
Browse files

Fixes #304

* spot/misc/game.cc: here.
parent 50fe34a5
......@@ -103,7 +103,8 @@ parity_game::attractor(const region_t& subgame, region_t& set,
}
++i;
}
if ((owner_[s] == odd && any) || (owner_[s] != odd && all))
if ((((owner_[s] && odd) || (!owner_[s] && !odd)) && any) ||
(((!owner_[s] && odd) || (owner_[s] && !odd)) && all))
  • Wouldn't it work to just force the conversion from owner_[s] to bool with !!owner_[s]? We could also improve the original code by explicitly making the lookup+comparison once.

    bool owner_is_odd = !!owner_[s] == odd;
    if ((owner_is_odd && any) || (!owner_is_odd && all))
       ...
Please register or sign in to reply
{
set.insert(s);
delta.insert(s);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment