Patch from James Harvey in response to the new Rectangles grid

generator: (a) take out the `#ifdef SLOW_SYSTEM' because the new
generator is much more efficient, and (b) convert another int to
size_t to prevent the solver going negative in 16-bit ints as a
result.

[originally from svn r5983]
This commit is contained in:
Simon Tatham
2005-06-21 08:15:53 +00:00
parent c98230dedf
commit 6dcbacc258

4
rect.c
View File

@ -101,10 +101,8 @@ static int game_fetch_preset(int i, char **name, game_params **params)
case 2: w = 11, h = 11; break;
case 3: w = 13, h = 13; break;
case 4: w = 15, h = 15; break;
#ifndef SLOW_SYSTEM
case 5: w = 17, h = 17; break;
case 6: w = 19, h = 19; break;
#endif
default: return FALSE;
}
@ -749,7 +747,7 @@ static int rect_solver(int w, int h, int nrects, struct numberdata *numbers,
int placement;
int number;
} *rpns = NULL;
int nrpns = 0, rpnsize = 0;
size_t nrpns = 0, rpnsize = 0;
int j;
for (i = 0; i < nrects; i++) {