core: move functions into trip-structure

Not strictly necessary, but a "natural" thing to do in a classical
C++ code base.

Move the tiny trip-table into its own source file, since it also
has its own header.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-08 15:28:16 +02:00 committed by bstoeger
parent 67d0f69516
commit 7792f54a73
16 changed files with 78 additions and 75 deletions

View file

@ -261,7 +261,7 @@ void dive_end(struct parser_state *state)
return;
if (is_dive(state)) {
if (state->cur_trip)
add_dive_to_trip(state->cur_dive.get(), state->cur_trip.get());
state->cur_trip->add_dive(state->cur_dive.get());
// Note: we add dives in an unsorted way. The caller of the parsing
// function must sort dives.
fixup_dive(state->cur_dive.get());