aboutsummaryrefslogtreecommitdiffstats
path: root/core/divelist.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-03 21:32:28 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-06 19:47:06 -0700
commite5dca8228e6b60cac5957726700c66d0565c064e (patch)
tree6ef0e32eb50d5838921602a1fbcab8c8747481cc /core/divelist.c
parentab14889563317b561eb22ad46d05f302cc582600 (diff)
downloadsubsurface-e5dca8228e6b60cac5957726700c66d0565c064e.tar.gz
Import: remove dive->downloaded logic
Dive importing is now performed via a distinct table which is merged into the main dive table. Thus, it is known which of the dive is new and which is old. This information can now be implicitely encoded in the parameter-position of merge_dive() [i.e. pass old as first and new as second dive]. This makes marking of downloaded dives via a flag unnecessary. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/divelist.c')
-rw-r--r--core/divelist.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/core/divelist.c b/core/divelist.c
index 41ebc4364..71556101c 100644
--- a/core/divelist.c
+++ b/core/divelist.c
@@ -1367,9 +1367,6 @@ void process_imported_dives(struct dive_table *import_table, bool prefer_importe
sort_table(import_table);
merge_imported_dives(import_table);
- for (i = 0; i < import_table->nr; i++)
- import_table->dives[i]->downloaded = true;
-
/* Merge newly imported dives into the dive table.
* Since both lists (old and new) are sorted, we can step
* through them concurrently and locate the insertions points.
@@ -1416,10 +1413,6 @@ void process_imported_dives(struct dive_table *import_table, bool prefer_importe
for ( ; i < import_table->nr; i++)
add_single_dive(dive_table.nr, import_table->dives[i]);
- /* make sure no dives are still marked as downloaded */
- for (i = 0; i < dive_table.nr; i++)
- dive_table.dives[i]->downloaded = false;
-
/* we took care of all dives, clean up the import table */
import_table->nr = 0;