diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-11-18 11:15:32 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-11-20 08:14:54 -0800 |
commit | 6bf4120dbbf7be1b9267e0e86f3948b77870ea71 (patch) | |
tree | 3282a26502c1a91ae63ceca450b82b11f5be4e78 /core/dive.h | |
parent | 3b9e0b59311908f6cbc099f3b7fd5294fd5d0d30 (diff) | |
download | subsurface-6bf4120dbbf7be1b9267e0e86f3948b77870ea71.tar.gz |
Core: replace tripflag by notrip boolean
The only remaining use of the tripflag was to mark dives that
were removed explicitly from a trip, i.e. shouldn't be autogrouped.
Therefore replace the enum by a simple boolean.
Currently, there is no way of unsetting the notrip flag. But this
shouldn't result in a user-visible change.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.h')
-rw-r--r-- | core/dive.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/core/dive.h b/core/dive.h index cc21c3447..8b98d3b49 100644 --- a/core/dive.h +++ b/core/dive.h @@ -278,13 +278,6 @@ struct divecomputer { #define W_IDX_PRIMARY 0 #define W_IDX_SECONDARY 1 -typedef enum { - TF_NONE, - NO_TRIP, - IN_TRIP, - NUM_TRIPFLAGS -} tripflag_t; - struct dive_table { int nr, allocated; struct dive **dives; @@ -307,7 +300,7 @@ extern dive_trip_t *dive_trip_list; struct picture; struct dive { int number; - tripflag_t tripflag; + bool notrip; /* Don't autogroup this dive to a trip */ dive_trip_t *divetrip; bool selected; bool hidden_by_filter; @@ -418,8 +411,6 @@ extern bool autogroup; * regularly dive at a local facility; this is why trips are an optional feature */ #define TRIP_THRESHOLD 3600 * 24 * 3 -#define DIVE_NEEDS_TRIP(_dive) ((_dive)->tripflag == TF_NONE) - extern void add_dive_to_trip(struct dive *, dive_trip_t *); struct dive *unregister_dive(int idx); |