diff options
| author | Simon Tatham <anakin@pobox.com> | 2012-01-31 08:32:26 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2012-01-31 08:32:26 +0000 |
| commit | f3168895c89e706c53c881f53ba3dfc0fc1150ec (patch) | |
| tree | 7dbd8b079c302d0eab960c90261ce84878181012 | |
| parent | 070327a44051461a83766d135affa14fda4fac7b (diff) | |
| download | puzzles-f3168895c89e706c53c881f53ba3dfc0fc1150ec.zip puzzles-f3168895c89e706c53c881f53ba3dfc0fc1150ec.tar.gz puzzles-f3168895c89e706c53c881f53ba3dfc0fc1150ec.tar.bz2 puzzles-f3168895c89e706c53c881f53ba3dfc0fc1150ec.tar.xz | |
Move a debug statement at the end of new_clues from the caller (just
after return) to the callee (just before). Might print something
useful in the soak-test context (where that debug statement will now
be printed and previously wasn't), but the main aim is to remove the
variable 'ngen' at the main call site, which triggered a set-but-not-
used warning if the debug statement that printed it was compiled out.
[originally from svn r9392]
| -rw-r--r-- | pearl.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1335,6 +1335,8 @@ static int new_clues(game_params *params, random_state *rs, break; /* got it */ } + debug(("%d %dx%d loops before finished puzzle.\n", ngen, w, h)); + return ngen; } @@ -1343,14 +1345,12 @@ static char *new_game_desc(game_params *params, random_state *rs, { char *grid, *clues; char *desc; - int ngen, w = params->w, h = params->h, i, j; + int w = params->w, h = params->h, i, j; grid = snewn(w*h, char); clues = snewn(w*h, char); - ngen = new_clues(params, rs, clues, grid); - - debug(("%d %dx%d loops before finished puzzle.\n", ngen, w, h)); + new_clues(params, rs, clues, grid); desc = snewn(w * h + 1, char); for (i = j = 0; i < w*h; i++) { |