core: move get_or_create_cylinder() to struct dive

Other cylinder-creation functions were already there.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-30 22:39:52 +02:00 committed by bstoeger
parent 777e7f32a5
commit 9bb2255ba8
12 changed files with 83 additions and 83 deletions

View file

@ -226,7 +226,7 @@ static void create_dive_from_plan(struct diveplan *diveplan, struct dive *dive,
/* Create first sample at time = 0, not based on dp because
* there is no real dp for time = 0, set first cylinder to 0
* O2 setpoint for this sample will be filled later from next dp */
cyl = get_or_create_cylinder(dive, 0);
cyl = dive->get_or_create_cylinder(0);
struct sample *sample = prepare_sample(dc);
sample->sac.mliter = prefs.bottomsac;
if (track_gas && cyl->type.workingpressure.mbar)