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.
This commit is contained in:
Simon Tatham
2023-04-20 14:46:46 +01:00
parent dad2f35502
commit 348aac4c85
15 changed files with 37 additions and 35 deletions

View File

@ -1466,7 +1466,7 @@ static int solve_bridge_sub(game_state *state, int x, int y, int d,
if (!sc->dsf)
sc->dsf = snew_dsf(wh);
dsf_init(sc->dsf, wh);
dsf_reinit(sc->dsf);
for (xi = 0; xi < w; xi++) {
for (yi = 0; yi < h; yi++) {