diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-04-06 14:48:54 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-04-06 14:48:54 +0100 |
| commit | a1ad0db8a6d829eddf1478cee44ae976bbcd325f (patch) | |
| tree | a6e62232e05e7779034c5f9d1bf743b6f1c198e3 /src/solvers/coord/solve.h | |
| parent | 0d4fa9ebbfcadfff4baf8fc3cd32a63dcfd7dd43 (diff) | |
| download | nissy-core-a1ad0db8a6d829eddf1478cee44ae976bbcd325f.tar.gz nissy-core-a1ad0db8a6d829eddf1478cee44ae976bbcd325f.zip | |
Fix integer conversions in code, tests and some toolsc-portability
Diffstat (limited to 'src/solvers/coord/solve.h')
| -rw-r--r-- | src/solvers/coord/solve.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h index fcdb06e..6bb9af2 100644 --- a/src/solvers/coord/solve.h +++ b/src/solvers/coord/solve.h | |||
| @@ -151,8 +151,7 @@ solve_coord_dfs(dfsarg_solve_coord_t arg[NON_NULL]) | |||
| 151 | { | 151 | { |
| 152 | bool lastbackup; | 152 | bool lastbackup; |
| 153 | uint8_t m, l, nnbackup, nibackup, nmoves; | 153 | uint8_t m, l, nnbackup, nibackup, nmoves; |
| 154 | uint32_t mm; | 154 | uint64_t mm, coord; |
| 155 | uint64_t coord; | ||
| 156 | int64_t n, ret; | 155 | int64_t n, ret; |
| 157 | cube_t backup_cube, backup_inverse; | 156 | cube_t backup_cube, backup_inverse; |
| 158 | 157 | ||
| @@ -190,7 +189,7 @@ solve_coord_dfs(dfsarg_solve_coord_t arg[NON_NULL]) | |||
| 190 | arg->lastisnormal = true; | 189 | arg->lastisnormal = true; |
| 191 | 190 | ||
| 192 | for (m = 0; m < NMOVES; m++) { | 191 | for (m = 0; m < NMOVES; m++) { |
| 193 | if (!(mm & (UINT32_C(1) << (uint32_t)m))) | 192 | if (!(mm & (UINT64_C(1) << (uint64_t)m))) |
| 194 | continue; | 193 | continue; |
| 195 | 194 | ||
| 196 | arg->solution_moves->moves[l] = m; | 195 | arg->solution_moves->moves[l] = m; |
| @@ -221,7 +220,7 @@ solve_coord_dfs(dfsarg_solve_coord_t arg[NON_NULL]) | |||
| 221 | arg->lastisnormal = false; | 220 | arg->lastisnormal = false; |
| 222 | 221 | ||
| 223 | for (m = 0; m < NMOVES; m++) { | 222 | for (m = 0; m < NMOVES; m++) { |
| 224 | if (!(mm & (UINT32_C(1) << (uint32_t)m))) | 223 | if (!(mm & (UINT64_C(1) << (uint64_t)m))) |
| 225 | continue; | 224 | continue; |
| 226 | 225 | ||
| 227 | arg->solution_moves->premoves[l] = m; | 226 | arg->solution_moves->premoves[l] = m; |
| @@ -280,8 +279,9 @@ solve_coord_dispatch( | |||
| 280 | return NISSY_ERROR_INVALID_SOLVER; | 279 | return NISSY_ERROR_INVALID_SOLVER; |
| 281 | } | 280 | } |
| 282 | 281 | ||
| 283 | return solve_coord(oc, coord, trans, nissflag, minmoves, maxmoves, | 282 | return solve_coord(oc, coord, trans, (uint8_t)nissflag, |
| 284 | maxsolutions, optimal, threads, data_size, data, | 283 | (uint8_t)minmoves, (uint8_t)maxmoves, (uint8_t)maxsolutions, |
| 284 | (uint8_t)optimal, (uint8_t)threads, data_size, data, | ||
| 285 | solutions_size, sols, poll_status, poll_status_data); | 285 | solutions_size, sols, poll_status, poll_status_data); |
| 286 | } | 286 | } |
| 287 | 287 | ||
