Consistently use snew_dsf to allocate dsfs.

All remaining cases where a dsf was allocated via snewn(foo, int) are
removed by this change.
This commit is contained in:
Simon Tatham
2023-04-20 13:56:44 +01:00
parent 11a8149d67
commit f21c7d2766
8 changed files with 11 additions and 13 deletions

View File

@ -312,10 +312,10 @@ static struct solver_scratch *new_scratch(int w, int h)
{
int W = w+1, H = h+1;
struct solver_scratch *ret = snew(struct solver_scratch);
ret->connected = snewn(W*H, int);
ret->connected = snew_dsf(W*H);
ret->exits = snewn(W*H, int);
ret->border = snewn(W*H, bool);
ret->equiv = snewn(w*h, int);
ret->equiv = snew_dsf(w*h);
ret->slashval = snewn(w*h, signed char);
ret->vbitmap = snewn(w*h, unsigned char);
return ret;