mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
3f197336aa
commit
6fe52ee19e
4 changed files with 4 additions and 22 deletions
10
parse-xml.c
10
parse-xml.c
|
@ -533,14 +533,8 @@ static void hex_value(char *buffer, void *_i)
|
|||
static void get_tripflag(char *buffer, void *_tf)
|
||||
{
|
||||
tripflag_t *tf = _tf;
|
||||
tripflag_t i;
|
||||
|
||||
*tf = TF_NONE;
|
||||
for (i = NO_TRIP; i < NUM_TRIPFLAGS; i++)
|
||||
if(! strcmp(buffer, tripflag_names[i])) {
|
||||
*tf = i;
|
||||
break;
|
||||
}
|
||||
*tf = strcmp(buffer, "NOTRIP") ? TF_NONE : NO_TRIP;
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
static void centibar(char *buffer, void *_pressure)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue