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

@ -1438,7 +1438,7 @@ static bool deduce_forcing_chain(struct solver_scratch *sc)
* class for each entire forcing chain, with the two possible sets
* of dominoes for the chain listed as inverses.
*/
dsf_init(sc->dsf_scratch, sc->pc);
dsf_reinit(sc->dsf_scratch);
for (si = 0; si < sc->wh; si++) {
struct solver_square *sq = &sc->squares[si];
if (sq->nplacements == 2)