mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: rename trip->index to trip->saved
The index-field was misused by the IO routines to mark which dives had been saved. Somewhat questionable, but let's at least name the field accordingly. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
3a933637da
commit
8ff7314b21
4 changed files with 11 additions and 10 deletions
|
@ -625,7 +625,7 @@ void save_dives_buffer(struct membuffer *b, const bool select_only)
|
|||
}
|
||||
put_format(b, "</divesites>\n<dives>\n");
|
||||
for (trip = dive_trip_list; trip != NULL; trip = trip->next)
|
||||
trip->index = 0;
|
||||
trip->saved = 0;
|
||||
|
||||
/* save the dives */
|
||||
for_each_dive(i, dive) {
|
||||
|
@ -645,11 +645,11 @@ void save_dives_buffer(struct membuffer *b, const bool select_only)
|
|||
}
|
||||
|
||||
/* Have we already seen this trip (and thus saved this dive?) */
|
||||
if (trip->index)
|
||||
if (trip->saved)
|
||||
continue;
|
||||
|
||||
/* We haven't seen this trip before - save it and all dives */
|
||||
trip->index = 1;
|
||||
trip->saved = 1;
|
||||
save_trip(b, trip);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue