Skip to content

Commit

Permalink
Fix nudge tool
Browse files Browse the repository at this point in the history
  • Loading branch information
trolando committed Jul 25, 2024
1 parent b23b87d commit 8d4b724
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/tools/nudge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,8 @@ nudge(Game *game, int profile)
pg::bitset mask(game->vertexcount());
mask.set();
mask[n] = false;
Game *subgame = game->extract_subgame(mask);
auto subgame = game->extract_subgame(mask);
game->swap(*subgame);
delete subgame;
return true;
} else if (action == 3) {
// remove the vertex and forward incoming edges if it has only 1 outgoing edge
Expand All @@ -174,9 +173,8 @@ nudge(Game *game, int profile)
pg::bitset mask(game->vertexcount());
mask.set();
mask[n] = false;
Game *subgame = game->extract_subgame(mask);
auto subgame = game->extract_subgame(mask);
game->swap(*subgame);
delete subgame;
return true;
}
} else if (action == 4) {
Expand Down Expand Up @@ -273,9 +271,8 @@ main(int argc, char **argv)
if (options.count("b")) {
std::vector<int> scc;
tarjan(game, rng(0, game->vertexcount()-1), scc, true);
Game *sub = game->extract_subgame(scc);
delete game;
game = sub;
auto sub = game->extract_subgame(scc);
game->swap(*sub);
}

/**
Expand Down

0 comments on commit 8d4b724

Please sign in to comment.