mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: convert weightsystem_t and weightsystem_table to C++
As for cylinders, this had to be done simultaneously, Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
28520da655
commit
640ecb345b
28 changed files with 137 additions and 247 deletions
|
@ -64,11 +64,12 @@ void get_dive_gas(const struct dive *dive, int *o2_p, int *he_p, int *o2max_p)
|
|||
|
||||
int total_weight(const struct dive *dive)
|
||||
{
|
||||
int i, total_grams = 0;
|
||||
int total_grams = 0;
|
||||
|
||||
if (dive)
|
||||
for (i = 0; i < dive->weightsystems.nr; i++)
|
||||
total_grams += dive->weightsystems.weightsystems[i].weight.grams;
|
||||
if (dive) {
|
||||
for (auto &ws: dive->weightsystems)
|
||||
total_grams += ws.weight.grams;
|
||||
}
|
||||
return total_grams;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue