core: use C++ structures for weightsystem info

Use std::vector<> instead of fixed size array.
Doesn't do any logic change, even though the back-translation
logic is ominous.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-04-17 17:31:50 +08:00 committed by bstoeger
parent c5f96d877d
commit 1af00703b3
8 changed files with 58 additions and 72 deletions

View file

@ -1298,7 +1298,7 @@ extern "C" struct dive *fixup_dive(struct dive *dive)
}
update_cylinder_related_info(dive);
for (i = 0; i < dive->weightsystems.nr; i++) {
weightsystem_t *ws = &dive->weightsystems.weightsystems[i];
const weightsystem_t &ws = dive->weightsystems.weightsystems[i];
add_weightsystem_description(ws);
}
/* we should always have a uniq ID as that gets assigned during alloc_dive(),