Core: remove "when" field of struct dive_trip

The when field gives the time of the first dive. Instead of keeping
this field in sync, replace it by a function that determines the time
of the first dive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-11-11 13:09:51 +01:00 committed by Dirk Hohndel
parent 431b2bb845
commit 64e6e435f8
11 changed files with 23 additions and 52 deletions

View file

@ -1352,10 +1352,6 @@ static void try_to_fill_trip(dive_trip_t **dive_trip_p, const char *name, char *
dive_trip_t *dive_trip = *dive_trip_p;
if (MATCH_STATE("date", divedate, &dive_trip->when))
return;
if (MATCH_STATE("time", divetime, &dive_trip->when))
return;
if (MATCH("location", utf8_string, &dive_trip->location))
return;
if (MATCH("notes", utf8_string, &dive_trip->notes))