mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
777e7f32a5
commit
9bb2255ba8
12 changed files with 83 additions and 83 deletions
|
|
@ -70,7 +70,7 @@ static int seac_dive(void *param, int, char **data, char **)
|
|||
state->cur_dive->number = atoi(data[0]);
|
||||
|
||||
// Create first cylinder
|
||||
cylinder_t *curcyl = get_or_create_cylinder(state->cur_dive.get(), 0);
|
||||
cylinder_t *curcyl = state->cur_dive->get_or_create_cylinder(0);
|
||||
|
||||
// Get time and date
|
||||
sscanf(data[2], "%d/%d/%2d", &day, &month, &year);
|
||||
|
|
@ -238,7 +238,7 @@ static int seac_dive(void *param, int, char **data, char **)
|
|||
seac_gaschange(state, sqlstmt);
|
||||
lastgas = curgas;
|
||||
cylnum ^= 1; // Only need to toggle between two cylinders
|
||||
curcyl = get_or_create_cylinder(state->cur_dive.get(), cylnum);
|
||||
curcyl = state->cur_dive->get_or_create_cylinder(cylnum);
|
||||
curcyl->gasmix.o2.permille = 10 * sqlite3_column_int(sqlstmt, 4);
|
||||
}
|
||||
state->cur_sample->stopdepth.mm = 10 * sqlite3_column_int(sqlstmt, 5);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue