-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I think it would make sense for Symptom detectors and observables to be of type size_t
, not int
.
E.g. to change this:
struct Symptom {
std::vector<int> detectors;
std::vector<int> observables;
...
to:
struct Symptom {
std::vector<size_t> detectors;
std::vector<size_t> observables;
...
and propagate that change throughout the repo.
It makes sense since they are indices for them to be unsigned, and the current choice leads to type mismatches that lead to these warnings etc:
In file included from src/tesseract.pybind.cc:23:
src/tesseract_sinter_compat.pybind.h: In member function 'pybind11::array_t<unsigned char> TesseractSinterCompiledDecoder::decode_shots_bit_packed(const pybind11::array_t<unsigned char>&)':
src/tesseract_sinter_compat.pybind.h:87:41: warning: comparison of integer expressions of different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'} [-Wsign-compare]
87 | if (obs_index >= 0 && obs_index < num_observables) {
Metadata
Metadata
Assignees
Labels
No labels