From 52c21640508c3fc668107778ae027ff4428ebd89 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 29 Jul 2025 10:55:29 +0200 Subject: Cleanup some TODOs --- src/solvers/coord/gendata.h | 4 ++-- src/solvers/coord/solve.h | 8 -------- src/solvers/h48/checkdata.h | 5 +---- src/solvers/h48/gendata_cocsep.h | 2 +- src/solvers/h48/gendata_h48.h | 6 +++--- src/solvers/solutions.h | 1 - src/solvers/tables_types_macros.h | 2 +- 7 files changed, 8 insertions(+), 20 deletions(-) (limited to 'src/solvers') diff --git a/src/solvers/coord/gendata.h b/src/solvers/coord/gendata.h index b43c56d..7118b08 100644 --- a/src/solvers/coord/gendata.h +++ b/src/solvers/coord/gendata.h @@ -57,7 +57,7 @@ gendata_coord(const coord_t coord[static 1], unsigned char *buf) .type = TABLETYPE_SPECIAL, .infosize = INFOSIZE, .fullsize = INFOSIZE + coord_dsize, - .hash = 0, /* TODO */ + .hash = 0, .next = INFOSIZE + coord_dsize, /* Unknown / non-applicable values */ @@ -105,7 +105,7 @@ genptable_coord( .type = TABLETYPE_PRUNING, .infosize = INFOSIZE, .fullsize = INFOSIZE + tablesize, - .hash = 0, /* TODO */ + .hash = 0, .entries = coord->max, .classes = 0, .bits = 4, diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h index a2f89db..75ec200 100644 --- a/src/solvers/coord/solve.h +++ b/src/solvers/coord/solve.h @@ -312,14 +312,6 @@ solve_coord( .solution_settings = &solution_settings, .solution_list = &solution_list, .nissflag = nissflag, - - /* - Since no move has been done yet, this field should be - neither true nor false; using its value now is logically - undefined behavior. - TODO: find a more elegant solution - */ - .lastisnormal = true, }; if (coord->coord(c, coord_data) == 0) { diff --git a/src/solvers/h48/checkdata.h b/src/solvers/h48/checkdata.h index 1ee053d..af0499d 100644 --- a/src/solvers/h48/checkdata.h +++ b/src/solvers/h48/checkdata.h @@ -1,10 +1,7 @@ STATIC long long checkdata_h48( const char *, unsigned long long, const unsigned char *); -/* -Currently unused. -TODO: re-introduce check on cocsep table -*/ +/* TODO: Currently unused, re-introduce check on cocsep table */ uint64_t expected_cocsep[21] = { [0] = 1, [1] = 6, diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h index 7a589b5..5d14db7 100644 --- a/src/solvers/h48/gendata_cocsep.h +++ b/src/solvers/h48/gendata_cocsep.h @@ -35,7 +35,7 @@ gendata_cocsep( .type = TABLETYPE_SPECIAL, .infosize = INFOSIZE, .fullsize = COCSEP_FULLSIZE, - .hash = 0, /* TODO */ + .hash = 0, .entries = COCSEP_TABLESIZE, .classes = COCSEP_CLASSES, .bits = 32, diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h index a7d8408..72cb05d 100644 --- a/src/solvers/h48/gendata_h48.h +++ b/src/solvers/h48/gendata_h48.h @@ -117,7 +117,7 @@ gendata_h48(gendata_h48_arg_t arg[static 1]) arg->cocsepdata = (uint32_t *)cocsepdata_offset; arg->h48buf = (_Atomic unsigned char*)arg->buf + cocsepsize; - arg->base = 99; /* TODO: set this somewhere else */ + arg->base = 99; if (arg->h == 0 && arg->k == 4) { gendata_h48h0k4(arg); @@ -220,7 +220,7 @@ gendata_h48h0k4(gendata_h48_arg_t arg[static 1]) .type = TABLETYPE_PRUNING, .infosize = INFOSIZE, .fullsize = H48_TABLESIZE(0, 4) + INFOSIZE, - .hash = 0, /* TODO */ + .hash = 0, .entries = H48_COORDMAX(0), .classes = 0, .h48h = 0, @@ -676,7 +676,7 @@ makeinfo_h48k2(gendata_h48_arg_t arg[static 1]) .type = TABLETYPE_PRUNING, .infosize = INFOSIZE, .fullsize = H48_TABLESIZE(arg->h, 2) + INFOSIZE, - .hash = 0, /* TODO */ + .hash = 0, .entries = H48_COORDMAX(arg->h), .classes = 0, .h48h = arg->h, diff --git a/src/solvers/solutions.h b/src/solvers/solutions.h index cdb1fdb..f3761d9 100644 --- a/src/solvers/solutions.h +++ b/src/solvers/solutions.h @@ -186,7 +186,6 @@ appendsolution( later, because the allowedmoves check would fail with improperly sorted parallel moves, but then transforming could swap the pairs the wrong way around. - TODO: maybe fix this */ sortparallel_moves(tsol[r].nmoves, tsol[r].moves); diff --git a/src/solvers/tables_types_macros.h b/src/solvers/tables_types_macros.h index 3db2d25..16e1346 100644 --- a/src/solvers/tables_types_macros.h +++ b/src/solvers/tables_types_macros.h @@ -26,7 +26,7 @@ typedef struct { uint64_t type; uint64_t infosize; uint64_t fullsize; - uint64_t hash; + uint64_t hash; /* Currently unused */ uint64_t entries; uint64_t classes; /* Used only by cocsepdata, for now */ uint64_t next; -- cgit v1.3