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/parse-xml.c | |
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/parse-xml.c')
-rw-r--r-- | core/parse-xml.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/parse-xml.c b/core/parse-xml.c index d9185cd32..931d12f6b 100644 --- a/core/parse-xml.c +++ b/core/parse-xml.c @@ -565,9 +565,9 @@ static void dive_site(char *buffer, struct dive_site **ds) *ds = get_dive_site_by_uuid(uuid); } -static void get_tripflag(char *buffer, tripflag_t *tf) +static void get_notrip(char *buffer, bool *notrip) { - *tf = strcmp(buffer, "NOTRIP") ? TF_NONE : NO_TRIP; + *notrip = !strcmp(buffer, "NOTRIP"); } /* @@ -1241,7 +1241,7 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf, str return; if (MATCH("tags", divetags, &dive->tag_list)) return; - if (MATCH("tripflag", get_tripflag, &dive->tripflag)) + if (MATCH("tripflag", get_notrip, &dive->notrip)) return; if (MATCH_STATE("date", divedate, &dive->when)) return; |