diff options
-rw-r--r-- | core/dive.h | 2 | ||||
-rw-r--r-- | core/downloadfromdcthread.cpp | 1 | ||||
-rw-r--r-- | core/libdivecomputer.c | 2 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 1 | ||||
-rw-r--r-- | qt-models/divetripmodel.cpp | 1 | ||||
-rw-r--r-- | tests/testrenumber.cpp | 2 |
6 files changed, 2 insertions, 7 deletions
diff --git a/core/dive.h b/core/dive.h index ccc15c782..674e52ec2 100644 --- a/core/dive.h +++ b/core/dive.h @@ -431,7 +431,7 @@ extern const struct units *get_units(void); extern int run_survey, verbose, quit, force_root; struct dive_table { - int nr, allocated, preexisting; + int nr, allocated; struct dive **dives; }; diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp index 70e4aac7d..e4dc80176 100644 --- a/core/downloadfromdcthread.cpp +++ b/core/downloadfromdcthread.cpp @@ -77,7 +77,6 @@ void DownloadThread::run() #endif qDebug() << "Starting download from " << (internalData->bluetooth_mode ? "BT" : internalData->devname); downloadTable.nr = 0; - dive_table.preexisting = dive_table.nr; Q_ASSERT(internalData->download_table != nullptr); const char *errorText; diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index 5b386c032..c182d2944 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -503,7 +503,7 @@ static int find_dive(struct divecomputer *match) { int i; - for (i = dive_table.preexisting - 1; i >= 0; i--) { + for (i = dive_table.nr - 1; i >= 0; i--) { struct dive *old = dive_table.dives[i]; if (match_one_dive(match, old)) diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 67f99b8d5..4927899de 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -671,7 +671,6 @@ successful_exit: // for the remote data - which then later gets merged with the remote data if necessary if (noCloudToCloud) { git_storage_update_progress(qPrintable(tr("Loading dives from local storage ('no cloud' mode)"))); - dive_table.preexisting = dive_table.nr; mergeLocalRepo(); DiveListModel::instance()->clear(); DiveListModel::instance()->addAllDives(); diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 41c8dea80..f0d167432 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -611,7 +611,6 @@ void DiveTripModel::setupModelData() clear(); if (autogroup) autogroup_dives(); - dive_table.preexisting = dive_table.nr; QMap<dive_trip_t *, TripItem *> trips; while (--i >= 0) { struct dive *dive = get_dive(i); diff --git a/tests/testrenumber.cpp b/tests/testrenumber.cpp index bd9ddf0ca..9c409c512 100644 --- a/tests/testrenumber.cpp +++ b/tests/testrenumber.cpp @@ -9,7 +9,6 @@ void TestRenumber::setup() { QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test47.xml", &dive_table), 0); process_loaded_dives(); - dive_table.preexisting = dive_table.nr; } void TestRenumber::testMerge() @@ -20,7 +19,6 @@ void TestRenumber::testMerge() QCOMPARE(dive_table.nr, 1); QCOMPARE(unsaved_changes(), 1); mark_divelist_changed(false); - dive_table.preexisting = dive_table.nr; } void TestRenumber::testMergeAndAppend() |