diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-21 14:33:01 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-21 14:44:07 +0200 |
| commit | 510a7471348788fccba6b7c4b9f7b7cc9aee6ba9 (patch) | |
| tree | 58df7791242d9a4f52e80da93ad3af20ed5e3528 /src/solvers/coord/solve.h | |
| parent | 1d9b8acfeece68c4f55d2499d8aed127f98a383c (diff) | |
| download | nissy-core-510a7471348788fccba6b7c4b9f7b7cc9aee6ba9.tar.gz nissy-core-510a7471348788fccba6b7c4b9f7b7cc9aee6ba9.zip | |
Always use unsigned char * for data buffers
Before this commit I was inconsistently using one of void *, char *
and uint8_t *.
Diffstat (limited to 'src/solvers/coord/solve.h')
| -rw-r--r-- | src/solvers/coord/solve.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h index 072aa27..fb996ac 100644 --- a/src/solvers/coord/solve.h +++ b/src/solvers/coord/solve.h | |||
| @@ -8,16 +8,16 @@ typedef struct { | |||
| 8 | uint8_t nissflag; | 8 | uint8_t nissflag; |
| 9 | bool lastisnormal; | 9 | bool lastisnormal; |
| 10 | coord_t *coord; | 10 | coord_t *coord; |
| 11 | const void *coord_data; | 11 | const unsigned char *coord_data; |
| 12 | const uint8_t *ptable; | 12 | const unsigned char *ptable; |
| 13 | } dfsarg_solve_coord_t; | 13 | } dfsarg_solve_coord_t; |
| 14 | 14 | ||
| 15 | STATIC int64_t solve_coord(cube_t, coord_t [static 1], uint8_t, uint8_t, | 15 | STATIC int64_t solve_coord(cube_t, coord_t [static 1], uint8_t, uint8_t, |
| 16 | uint8_t, uint8_t, uint64_t, uint8_t, uint8_t, uint64_t, const void *, | 16 | uint8_t, uint8_t, uint64_t, uint8_t, uint8_t, uint64_t, |
| 17 | size_t n, char [n]); | 17 | const unsigned char *, size_t n, char [n]); |
| 18 | STATIC int64_t solve_coord_dispatch(cube_t, const char *, uint8_t, uint8_t, | 18 | STATIC int64_t solve_coord_dispatch(cube_t, const char *, uint8_t, uint8_t, |
| 19 | uint8_t, uint64_t, uint8_t, uint8_t, uint64_t, const void *, size_t n, | 19 | uint8_t, uint64_t, uint8_t, uint8_t, uint64_t, const unsigned char *, |
| 20 | char [n]); | 20 | size_t n, char [n]); |
| 21 | STATIC bool coord_solution_admissible(const dfsarg_solve_coord_t [static 1]); | 21 | STATIC bool coord_solution_admissible(const dfsarg_solve_coord_t [static 1]); |
| 22 | STATIC bool solve_coord_dfs_stop(const dfsarg_solve_coord_t [static 1]); | 22 | STATIC bool solve_coord_dfs_stop(const dfsarg_solve_coord_t [static 1]); |
| 23 | STATIC bool coord_continue_onnormal(const dfsarg_solve_coord_t [static 1]); | 23 | STATIC bool coord_continue_onnormal(const dfsarg_solve_coord_t [static 1]); |
| @@ -209,7 +209,7 @@ solve_coord_dispatch( | |||
| 209 | uint8_t optimal, | 209 | uint8_t optimal, |
| 210 | uint8_t threads, | 210 | uint8_t threads, |
| 211 | uint64_t data_size, | 211 | uint64_t data_size, |
| 212 | const void *data, | 212 | const unsigned char *data, |
| 213 | size_t solutions_size, | 213 | size_t solutions_size, |
| 214 | char sols[solutions_size] | 214 | char sols[solutions_size] |
| 215 | ) | 215 | ) |
| @@ -248,7 +248,7 @@ solve_coord( | |||
| 248 | uint8_t optimal, | 248 | uint8_t optimal, |
| 249 | uint8_t threads, | 249 | uint8_t threads, |
| 250 | uint64_t data_size, | 250 | uint64_t data_size, |
| 251 | const void *data, | 251 | const unsigned char *data, |
| 252 | size_t solutions_size, | 252 | size_t solutions_size, |
| 253 | char sols[solutions_size] | 253 | char sols[solutions_size] |
| 254 | ) | 254 | ) |
| @@ -257,8 +257,8 @@ solve_coord( | |||
| 257 | uint8_t t; | 257 | uint8_t t; |
| 258 | int64_t ndepth; | 258 | int64_t ndepth; |
| 259 | cube_t c; | 259 | cube_t c; |
| 260 | const void *coord_data; | 260 | const unsigned char *coord_data; |
| 261 | const uint8_t *ptable; | 261 | const unsigned char *ptable; |
| 262 | dfsarg_solve_coord_t arg; | 262 | dfsarg_solve_coord_t arg; |
| 263 | tableinfo_t info; | 263 | tableinfo_t info; |
| 264 | solution_moves_t solution_moves; | 264 | solution_moves_t solution_moves; |
| @@ -280,11 +280,11 @@ solve_coord( | |||
| 280 | if (info.type == TABLETYPE_PRUNING) { | 280 | if (info.type == TABLETYPE_PRUNING) { |
| 281 | /* Only the pruning table */ | 281 | /* Only the pruning table */ |
| 282 | coord_data = NULL; | 282 | coord_data = NULL; |
| 283 | ptable = (uint8_t *)data + INFOSIZE; | 283 | ptable = data + INFOSIZE; |
| 284 | } else { | 284 | } else { |
| 285 | /* Coordinate has extra data */ | 285 | /* Coordinate has extra data */ |
| 286 | coord_data = (uint8_t *)data + INFOSIZE; | 286 | coord_data = data + INFOSIZE; |
| 287 | ptable = (uint8_t *)data + info.next + INFOSIZE; | 287 | ptable = data + info.next + INFOSIZE; |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | solution_moves_reset(&solution_moves); | 290 | solution_moves_reset(&solution_moves); |
