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

@ -545,7 +545,7 @@ int save_dive(FILE *f, const struct dive &dive, bool anonymize)
static void save_trip(struct membuffer *b, dive_trip &trip, bool anonymize)
{
put_format(b, "<trip");
show_date(b, trip_date(trip));
show_date(b, trip.date());
show_utf8(b, trip.location.c_str(), " location=\'", "\'", 1);
put_format(b, ">\n");
show_utf8(b, trip.notes.c_str(), "<notes>", "</notes>\n", 0);