From 348aac4c85da21e09c29c58866d178df3204d73c Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 20 Apr 2023 14:46:46 +0100 Subject: 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. --- loopy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'loopy.c') diff --git a/loopy.c b/loopy.c index 11500e1..903fb5a 100644 --- a/loopy.c +++ b/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; } -- cgit v1.1