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:
Berthold Stoeger 2024-05-29 07:03:03 +02:00 committed by bstoeger
parent 28520da655
commit 640ecb345b
28 changed files with 137 additions and 247 deletions

View file

@ -6,7 +6,7 @@
#include "divemode.h"
#include "divecomputer.h"
#include "equipment.h" // TODO: remove
#include "equipment.h"
#include "picture.h" // TODO: remove
#include <string>
@ -30,8 +30,8 @@ struct dive {
struct dive_site *dive_site = nullptr;
char *notes = nullptr;
char *diveguide = nullptr, *buddy = nullptr;
struct cylinder_table cylinders;
struct weightsystem_table weightsystems = { };
cylinder_table cylinders;
weightsystem_table weightsystems;
char *suit = nullptr;
int number = 0;
int rating = 0;
@ -190,7 +190,6 @@ extern struct event create_gas_switch_event(struct dive *dive, struct divecomput
extern void per_cylinder_mean_depth(const struct dive *dive, struct divecomputer *dc, int *mean, int *duration);
extern int get_cylinder_index(const struct dive *dive, const struct event &ev);
extern struct gasmix get_gasmix_from_event(const struct dive *, const struct event &ev);
extern int nr_weightsystems(const struct dive *dive);
extern bool cylinder_with_sensor_sample(const struct dive *dive, int cylinder_id);
/* UI related protopypes */