aboutsummaryrefslogtreecommitdiff
path: root/bridges.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2006-11-01 11:31:20 +0000
committerSimon Tatham <anakin@pobox.com>2006-11-01 11:31:20 +0000
commit9b31ed25d8b92be550b0a91959ac9bede3aea159 (patch)
treefcefc9d3d49d63ba63715c6f2782b5cf7fdc012b /bridges.c
parentfe4fd0ebc5eddb411d1d3dd521ef462799705e00 (diff)
downloadpuzzles-9b31ed25d8b92be550b0a91959ac9bede3aea159.zip
puzzles-9b31ed25d8b92be550b0a91959ac9bede3aea159.tar.gz
puzzles-9b31ed25d8b92be550b0a91959ac9bede3aea159.tar.bz2
puzzles-9b31ed25d8b92be550b0a91959ac9bede3aea159.tar.xz
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]
Diffstat (limited to 'bridges.c')
-rw-r--r--bridges.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/bridges.c b/bridges.c
index be173ff..93faf32 100644
--- a/bridges.c
+++ b/bridges.c
@@ -1064,8 +1064,7 @@ static void map_group(game_state *state)
struct island *is, *is_join;
/* Initialise dsf. */
- for (i = 0; i < wh; i++)
- dsf[i] = i;
+ dsf_init(dsf, wh);
/* For each island, find connected islands right or down
* and merge the dsf for the island squares as well as the
@@ -1602,9 +1601,8 @@ static game_state *new_state(game_params *params)
ret->solved = ret->completed = 0;
ret->solver = snew(struct solver_state);
- ret->solver->dsf = snewn(wh, int);
+ ret->solver->dsf = snew_dsf(wh);
ret->solver->tmpdsf = snewn(wh, int);
- for (i = 0; i < wh; i++) ret->solver->dsf[i] = i;
ret->solver->refcount = 1;