Mike's changes to dsf.c alter the internal storage format of dsf

structures, meaning that ad-hoc initialisation now doesn't work.
Hence, this checkin converts all ad-hoc dsf initialisations into
calls to dsf_init() or snew_dsf(). At least, I _hope_ I've caught
all of them.

[originally from svn r6888]
This commit is contained in:
Simon Tatham
2006-11-01 11:31:20 +00:00
parent fe4fd0ebc5
commit 9b31ed25d8
4 changed files with 8 additions and 18 deletions

4
net.c
View File

@ -521,9 +521,7 @@ static int net_solver(int w, int h, unsigned char *tiles,
* classes) by finding the representative of each tile and
* setting equivalence[one]=the_other.
*/
equivalence = snewn(w * h, int);
for (i = 0; i < w*h; i++)
equivalence[i] = i; /* initially all distinct */
equivalence = snew_dsf(w * h);
/*
* On a non-wrapping grid, we instantly know that all the edges