mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: convert picture.c to C++
The last C-file in core. Yippie. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7d3977481a
commit
9065bf8622
6 changed files with 9 additions and 10 deletions
|
@ -71,7 +71,7 @@ void event_end(struct parser_state *state)
|
|||
{
|
||||
struct divecomputer *dc = get_dc(state);
|
||||
if (state->cur_event.type == 123) {
|
||||
struct picture pic = empty_picture;
|
||||
struct picture pic;
|
||||
pic.filename = strdup(state->cur_event.name);
|
||||
/* theoretically this could fail - but we didn't support multi year offsets */
|
||||
pic.offset.seconds = state->cur_event.time.seconds;
|
||||
|
@ -313,7 +313,7 @@ void picture_end(struct parser_state *state)
|
|||
{
|
||||
add_picture(&state->cur_dive->pictures, state->cur_picture);
|
||||
/* dive_add_picture took ownership, we can just clear out copy of the data */
|
||||
state->cur_picture = empty_picture;
|
||||
state->cur_picture = picture();
|
||||
}
|
||||
|
||||
cylinder_t *cylinder_start(struct parser_state *state)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue