mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 15:41:30 -07:00
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:
4
loopy.c
4
loopy.c
@ -457,7 +457,7 @@ static solver_state *dup_solver_state(const solver_state *sstate) {
|
||||
|
||||
ret->dotdsf = snew_dsf(num_dots);
|
||||
ret->looplen = snewn(num_dots, int);
|
||||
dsf_copy(ret->dotdsf, sstate->dotdsf, num_dots);
|
||||
dsf_copy(ret->dotdsf, sstate->dotdsf);
|
||||
memcpy(ret->looplen, sstate->looplen,
|
||||
num_dots * sizeof(int));
|
||||
|
||||
@ -486,7 +486,7 @@ static solver_state *dup_solver_state(const solver_state *sstate) {
|
||||
|
||||
if (sstate->linedsf) {
|
||||
ret->linedsf = snew_dsf(num_edges);
|
||||
dsf_copy(ret->linedsf, sstate->linedsf, num_edges);
|
||||
dsf_copy(ret->linedsf, sstate->linedsf);
|
||||
} else {
|
||||
ret->linedsf = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user