diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-11-08 16:58:33 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-11-18 16:50:09 -0800 |
commit | 6b283e598a3a08c6133d66b5d5617370296e7d0e (patch) | |
tree | 685ccf1fd839d72471b179bf12aa72d2bdcec7de /core/save-html.c | |
parent | bc7afebc23477ef23f2b9741bf45b2180cbafe15 (diff) | |
download | subsurface-6b283e598a3a08c6133d66b5d5617370296e7d0e.tar.gz |
Dive list: replace dive-list of trips by a table
The dives of each trip were kept in a list. Replace this by a
struct dive_table. This will make it significantly easier to
keep the dives of a trip in sorted state.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/save-html.c')
-rw-r--r-- | core/save-html.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/save-html.c b/core/save-html.c index ea46d49ea..ec5751453 100644 --- a/core/save-html.c +++ b/core/save-html.c @@ -408,7 +408,8 @@ void write_trip(struct membuffer *b, dive_trip_t *trip, int *dive_no, bool selec char *separator = ""; bool found_sel_dive = 0; - for (dive = trip->dives; dive != NULL; dive = dive->next) { + for (int i = 0; i < trip->dives.nr; i++) { + dive = trip->dives.dives[i]; if (!dive->selected && selected_only) continue; |