diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-04-20 14:46:46 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-04-20 17:30:03 +0100 |
| commit | 348aac4c85da21e09c29c58866d178df3204d73c (patch) | |
| tree | eff802bf3ef3b5459bbe268e35328b1155cf3472 /galaxies.c | |
| parent | dad2f35502c611dae758915cfb6dface4a303550 (diff) | |
| download | puzzles-348aac4c85da21e09c29c58866d178df3204d73c.zip puzzles-348aac4c85da21e09c29c58866d178df3204d73c.tar.gz puzzles-348aac4c85da21e09c29c58866d178df3204d73c.tar.bz2 puzzles-348aac4c85da21e09c29c58866d178df3204d73c.tar.xz | |
Remove size parameter from dsf init and copy functions.
Now that the dsf knows its own size internally, there's no need to
tell it again when one is copied or reinitialised.
This makes dsf_init much more about *re*initialising a dsf, since now
dsfs are always allocated using a function that will initialise them
anyway. So I think it deserves a rename.
Diffstat (limited to 'galaxies.c')
| -rw-r--r-- | galaxies.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2283,7 +2283,7 @@ static int solver_extend_exclaves(game_state *state, solver_ctx *sctx) * doesn't contain its own dot is an 'exclave', and will need some * kind of path of tiles to connect it back to the dot. */ - dsf_init(sctx->dsf, sctx->sz); + dsf_reinit(sctx->dsf); for (x = 1; x < state->sx; x += 2) { for (y = 1; y < state->sy; y += 2) { int dotx, doty; @@ -3084,7 +3084,7 @@ static bool check_complete(const game_state *state, DSF *dsf, int *colours) dsf = snew_dsf(w*h); free_dsf = true; } else { - dsf_init(dsf, w*h); + dsf_reinit(dsf); free_dsf = false; } |