diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-26 14:52:07 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-26 21:44:51 -0700 |
commit | 6fe52ee19e5e9cd33bd1ceab4609f31829ff2f08 (patch) | |
tree | 1374e09c1eebcb44c4066345fd0f8411e3ca14b9 /save-xml.c | |
parent | 3f197336aa3aa1485bd1fdc38d21050006857909 (diff) | |
download | subsurface-6fe52ee19e5e9cd33bd1ceab4609f31829ff2f08.tar.gz |
Simplify tripflags: remove tripflag_names[]
This removes the tripflag name array, since it's not actually useful.
The only information we ever save in the XML file is whether a dive is
explicitly not supposed to ever be grouped with a trip ("NOTRIP"), and
everything else is implicit.
I'm going to simplify the trip flags further (possibly removing it
entirely - like I did for dive trips already), and don't like having to
maintain the tripflag_names[] array logic.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r-- | save-xml.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/save-xml.c b/save-xml.c index 58faf6aeb..8d7d7f889 100644 --- a/save-xml.c +++ b/save-xml.c @@ -373,14 +373,8 @@ static void save_dive(FILE *f, struct dive *dive) fputs("<dive", f); if (dive->number) fprintf(f, " number='%d'", dive->number); - /* - * TF_NONE is the default for dives with no trips - * IN_TRIP is the default for dives with trips - * ASSIGNED_TRIP is an in-memory thing and gets converted - * to IN_TRIP by the save code. - */ - if (dive->tripflag != TF_NONE && dive->tripflag != IN_TRIP && dive->tripflag != ASSIGNED_TRIP) - fprintf(f, " tripflag='%s'", tripflag_names[dive->tripflag]); + if (dive->tripflag == NO_TRIP) + fprintf(f, " tripflag='NOTRIP'"); if (dive->rating) fprintf(f, " rating='%d'", dive->rating); if (dive->visibility) |