Giant const patch of doom: add a 'const' to every parameter in every

puzzle backend function which ought to have it, and propagate those
consts through to per-puzzle subroutines as needed.

I've recently had to do that to a few specific parameters which were
being misused by particular puzzles (r9657, r9830), which suggests
that it's probably a good idea to do the whole lot pre-emptively
before the next such problem shows up.

[originally from svn r9832]
[r9657 == 3b250baa02a7332510685948bf17576c397b8ceb]
[r9830 == 0b93de904a98f119b1a95d3a53029f1ed4bfb9b3]
This commit is contained in:
Simon Tatham
2013-04-13 10:37:32 +00:00
parent 339329449f
commit 251b21c418
45 changed files with 1856 additions and 1655 deletions

5
grid.h
View File

@ -115,9 +115,10 @@ typedef enum grid_type { GRIDGEN_LIST(ENUM) GRID_TYPE_MAX } grid_type;
/* Free directly after use if non-NULL. Will never contain an underscore
* (so clients can safely use that as a separator). */
char *grid_new_desc(grid_type type, int width, int height, random_state *rs);
char *grid_validate_desc(grid_type type, int width, int height, char *desc);
char *grid_validate_desc(grid_type type, int width, int height,
const char *desc);
grid *grid_new(grid_type type, int width, int height, char *desc);
grid *grid_new(grid_type type, int width, int height, const char *desc);
void grid_free(grid *g);