aboutsummaryrefslogtreecommitdiffstats
path: root/core/parse.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-11-08 17:13:17 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-11-18 16:50:09 -0800
commit0618aa737fde54e634d16273ec0246ced9c454aa (patch)
tree0ebcb45cb2c3849d5b78fc979e9984380485a9a3 /core/parse.c
parentc48056300d61987850dbe9ad92b20a293d03dc75 (diff)
downloadsubsurface-0618aa737fde54e634d16273ec0246ced9c454aa.tar.gz
Core: unify insert_trip() and insert_trip_dont_merge()
There were two versions of the insert_trip() function: one would merge trips if a trip with the same date already existed, the other wouldn't. The latter was introduced with the dive-list undo work. The problem is that the "date" of a trip (i.e. the first dive) seems ill-defined as this is a volatile value. Moreover in the context of making dive-import undoable this is a very dangerous notion, as the caller needs control over when the dives are added to a trip. Therefore, unify these two functions and never merge trips. The decision on merging dives now has to made by the caller. This will be implemented in a future commit. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/parse.c')
-rw-r--r--core/parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/parse.c b/core/parse.c
index 56e2e1b6f..f54d36742 100644
--- a/core/parse.c
+++ b/core/parse.c
@@ -279,7 +279,7 @@ void trip_end(struct parser_state *state)
{
if (!state->cur_trip)
return;
- insert_trip(&state->cur_trip);
+ insert_trip(state->cur_trip);
state->cur_trip = NULL;
}