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. --- slant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'slant.c') diff --git a/slant.c b/slant.c index a53813a..51b8b4a 100644 --- a/slant.c +++ b/slant.c @@ -472,13 +472,13 @@ static int slant_solve(int w, int h, const signed char *clues, * Establish a disjoint set forest for tracking connectedness * between grid points. */ - dsf_init(sc->connected, W*H); + dsf_reinit(sc->connected); /* * Establish a disjoint set forest for tracking which squares * are known to slant in the same direction. */ - dsf_init(sc->equiv, w*h); + dsf_reinit(sc->equiv); /* * Clear the slashval array. -- cgit v1.1