mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: return cylinder from add_empty_cylinder()
As a convenience, return the cylinder from add_empty_cylinder() to spare the caller from the nasty expression to fetch the last cylinder. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
8df3705152
commit
c26e922802
4 changed files with 5 additions and 7 deletions
|
@ -2126,9 +2126,7 @@ static int match_cylinder(const cylinder_t *cyl, const struct dive *dive, const
|
|||
*/
|
||||
static void merge_one_cylinder(struct cylinder_table *t, const cylinder_t *a, const cylinder_t *b)
|
||||
{
|
||||
cylinder_t *res;
|
||||
add_empty_cylinder(t);
|
||||
res = t->cylinders + (t->nr - 1);
|
||||
cylinder_t *res = add_empty_cylinder(t);
|
||||
res->type.size.mliter = a->type.size.mliter ?
|
||||
a->type.size.mliter : b->type.size.mliter;
|
||||
res->type.workingpressure.mbar = a->type.workingpressure.mbar ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue