mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Actually remove cylinders and weightsystems from the data structures
The UI had only stubbed this code out. This adds the implementation of the helpers and calls them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d6bee060af
commit
56c58bdd24
3 changed files with 34 additions and 8 deletions
14
dive.h
14
dive.h
|
|
@ -155,12 +155,6 @@ typedef struct {
|
|||
const char *description; /* "integrated", "belt", "ankle" */
|
||||
} weightsystem_t;
|
||||
|
||||
extern bool cylinder_nodata(cylinder_t *cyl);
|
||||
extern bool cylinder_none(void *_data);
|
||||
extern bool weightsystem_none(void *_data);
|
||||
extern bool no_weightsystems(weightsystem_t *ws);
|
||||
extern bool weightsystems_equal(weightsystem_t *ws1, weightsystem_t *ws2);
|
||||
|
||||
extern int get_pressure_units(unsigned int mb, const char **units);
|
||||
extern double get_depth_units(unsigned int mm, int *frac, const char **units);
|
||||
extern double get_volume_units(unsigned int ml, int *frac, const char **units);
|
||||
|
|
@ -743,6 +737,14 @@ struct tank_info {
|
|||
int cuft, ml, psi, bar;
|
||||
};
|
||||
|
||||
extern bool cylinder_nodata(cylinder_t *cyl);
|
||||
extern bool cylinder_none(void *_data);
|
||||
extern bool weightsystem_none(void *_data);
|
||||
extern bool no_weightsystems(weightsystem_t *ws);
|
||||
extern bool weightsystems_equal(weightsystem_t *ws1, weightsystem_t *ws2);
|
||||
extern void remove_cylinder(struct dive *dive, int idx);
|
||||
extern void remove_weightsystem(struct dive *dive, int idx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue