diff options
| author | Simon Tatham <anakin@pobox.com> | 2013-04-12 17:11:49 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2013-04-12 17:11:49 +0000 |
| commit | 0b93de904a98f119b1a95d3a53029f1ed4bfb9b3 (patch) | |
| tree | e1fef5c0a006feb7c2a631c7e5c81487221734d7 /singles.c | |
| parent | 383c15794a517a4e6dc0b7364edac1f7056cee82 (diff) | |
| download | puzzles-0b93de904a98f119b1a95d3a53029f1ed4bfb9b3.zip puzzles-0b93de904a98f119b1a95d3a53029f1ed4bfb9b3.tar.gz puzzles-0b93de904a98f119b1a95d3a53029f1ed4bfb9b3.tar.bz2 puzzles-0b93de904a98f119b1a95d3a53029f1ed4bfb9b3.tar.xz | |
Add 'const' to the game_params arguments in validate_desc and
new_desc. Oddities in the 'make test' output brought to my attention
that a few puzzles have been modifying their input game_params for
various reasons; they shouldn't do that, because that's the
game_params held permanently by the midend and it will affect
subsequent game generations if they modify it. So now those arguments
are const, and all the games which previously modified their
game_params now take a copy and modify that instead.
[originally from svn r9830]
Diffstat (limited to 'singles.c')
| -rw-r--r-- | singles.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -333,7 +333,7 @@ static int c2n(char c) { return -1; } -static void unpick_desc(game_params *params, char *desc, +static void unpick_desc(const game_params *params, char *desc, game_state **sout, char **mout) { game_state *state = blank_game(params->w, params->h); @@ -1207,7 +1207,7 @@ solved: the solver gets a headstart working out where they are. */ -static int new_game_is_good(game_params *params, +static int new_game_is_good(const game_params *params, game_state *state, game_state *tosolve) { int sret, sret_easy = 0; @@ -1289,7 +1289,7 @@ found: return j; } -static char *new_game_desc(game_params *params, random_state *rs, +static char *new_game_desc(const game_params *params, random_state *rs, char **aux, int interactive) { game_state *state = blank_game(params->w, params->h); @@ -1401,7 +1401,7 @@ randomise: return ret; } -static char *validate_desc(game_params *params, char *desc) +static char *validate_desc(const game_params *params, char *desc) { char *ret = NULL; |