mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: always keep an empty cylinder at the end of the cylinder array
This will be temporarilly used by the planner to mark consumption of air at the surface. Do this by creating a new function add_cylinder, which replaces add_to_cylinder_table() and takes care of always adding a dummy cylinder at the end of the table. Make the original add_to_cylinder_table() local, so that it cannot be accessed anymore. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0c28821d28
commit
b949bad026
10 changed files with 28 additions and 16 deletions
|
@ -455,7 +455,7 @@ static void parse_dive_cylinder(char *line, struct membuffer *str, struct git_pa
|
|||
if (cylinder.cylinder_use == OXYGEN)
|
||||
state->o2pressure_sensor = state->active_dive->cylinders.nr;
|
||||
|
||||
add_to_cylinder_table(&state->active_dive->cylinders, state->active_dive->cylinders.nr, cylinder);
|
||||
add_cylinder(&state->active_dive->cylinders, state->active_dive->cylinders.nr, cylinder);
|
||||
}
|
||||
|
||||
static void parse_weightsystem_keyvalue(void *_ws, const char *key, const char *value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue