summaryrefslogtreecommitdiffstats
path: root/core/parse.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-11-18 11:06:24 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-11-20 08:14:54 -0800
commit3b9e0b59311908f6cbc099f3b7fd5294fd5d0d30 (patch)
tree8c48b277b2e24855903144770338b5af60c785db /core/parse.c
parentdcb2a17b7dcef6bd0802897f9ef2cfbe4206fe61 (diff)
downloadsubsurface-3b9e0b59311908f6cbc099f3b7fd5294fd5d0d30.tar.gz
Core: remove ASSIGNED_TRIP trip flag
The distinction between ASSIGNED_TRIP and IN_TRIP was used to prefer non-autogenerated trips on merging of dives. But owing to bit rot this seem to have worked only partially anyway: The IN_TRIP field was set in create_and_hookup_trip_from_dive() and immediately overwritten in add_dive_to_trip() called in the next line. Instead, use the trip->autogen flag to check for priority and remove the ASSIGNED_TRIP flag alltogether. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/parse.c')
-rw-r--r--core/parse.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/parse.c b/core/parse.c
index 6f12736a8..8683daed4 100644
--- a/core/parse.c
+++ b/core/parse.c
@@ -254,10 +254,8 @@ void dive_end(struct parser_state *state)
free_dive(state->cur_dive);
else
record_dive_to_table(state->cur_dive, state->target_table);
- if (state->cur_trip) {
+ if (state->cur_trip)
add_dive_to_trip(state->cur_dive, state->cur_trip);
- state->cur_dive->tripflag = IN_TRIP;
- }
state->cur_dive = NULL;
state->cur_dc = NULL;
state->cur_location.lat.udeg = 0;