diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-04-20 14:06:43 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-04-20 17:23:21 +0100 |
| commit | 89c438e149a91fffa74b2669f7e0cd05abc3420f (patch) | |
| tree | a307d0c2dde7c2868e32a840497d44051d9b4630 /loopy.c | |
| parent | 7abf85a9c6b460698994d9cfa538b7b26fed5e87 (diff) | |
| download | puzzles-89c438e149a91fffa74b2669f7e0cd05abc3420f.zip puzzles-89c438e149a91fffa74b2669f7e0cd05abc3420f.tar.gz puzzles-89c438e149a91fffa74b2669f7e0cd05abc3420f.tar.bz2 puzzles-89c438e149a91fffa74b2669f7e0cd05abc3420f.tar.xz | |
Declare all dsfs as a dedicated type name 'DSF'.
In this commit, 'DSF' is simply a typedef for 'int', so that the new
declaration form 'DSF *' translates to the same type 'int *' that dsfs
have always had. So all we're doing here is mechanically changing type
declarations throughout the code.
Diffstat (limited to 'loopy.c')
| -rw-r--r-- | loopy.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -157,7 +157,7 @@ typedef struct solver_state { char *face_yes_count; char *face_no_count; bool *dot_solved, *face_solved; - int *dotdsf; + DSF *dotdsf; /* Information for Normal level deductions: * For each dline, store a bitmask for whether we know: @@ -166,7 +166,7 @@ typedef struct solver_state { char *dlines; /* Hard level information */ - int *linedsf; + DSF *linedsf; } solver_state; /* @@ -1545,7 +1545,8 @@ static bool check_completion(game_state *state) grid *g = state->game_grid; int i; bool ret; - int *dsf, *component_state; + DSF *dsf; + int *component_state; int nsilly, nloop, npath, largest_comp, largest_size, total_pathsize; enum { COMP_NONE, COMP_LOOP, COMP_PATH, COMP_SILLY, COMP_EMPTY }; @@ -1993,7 +1994,7 @@ static int parity_deductions(solver_state *sstate, { game_state *state = sstate->state; int diff = DIFF_MAX; - int *linedsf = sstate->linedsf; + DSF *linedsf = sstate->linedsf; if (unknown_count == 2) { /* Lines are known alike/opposite, depending on inv. */ |