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
|
|
@ -289,8 +289,7 @@ void picture_end(struct parser_state *state)
|
|||
|
||||
cylinder_t *cylinder_start(struct parser_state *state)
|
||||
{
|
||||
add_empty_cylinder(&state->cur_dive->cylinders);
|
||||
return &state->cur_dive->cylinders.cylinders[state->cur_dive->cylinders.nr - 1];
|
||||
return add_empty_cylinder(&state->cur_dive->cylinders);
|
||||
}
|
||||
|
||||
void cylinder_end(struct parser_state *state)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue