summaryrefslogtreecommitdiffstats
path: root/qt-models/diveimportedmodel.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-08 21:25:02 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-10 02:37:03 +0900
commite1cd055111cc4f7e11454b3726741f9f8a55d850 (patch)
treebb391d65743da3285367ec1f1803925978db6877 /qt-models/diveimportedmodel.cpp
parent70cabb968c481e566e8249465f153e05e6dc0347 (diff)
downloadsubsurface-e1cd055111cc4f7e11454b3726741f9f8a55d850.tar.gz
code cleanup: add empty table structures
It seemed to make sense to combine all three types in one commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/diveimportedmodel.cpp')
-rw-r--r--qt-models/diveimportedmodel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-models/diveimportedmodel.cpp b/qt-models/diveimportedmodel.cpp
index cfadef9b8..b6b5f2402 100644
--- a/qt-models/diveimportedmodel.cpp
+++ b/qt-models/diveimportedmodel.cpp
@@ -3,8 +3,8 @@
#include "core/divelist.h"
DiveImportedModel::DiveImportedModel(QObject *o) : QAbstractTableModel(o),
- diveTable({ 0 }),
- sitesTable({ 0 })
+ diveTable(empty_dive_table),
+ sitesTable(empty_dive_site_table)
{
connect(&thread, &QThread::finished, this, &DiveImportedModel::downloadThreadFinished);
}
@@ -147,8 +147,8 @@ std::pair<struct dive_table, struct dive_site_table> DiveImportedModel::consumeT
beginResetModel();
// Move tables to result
- struct dive_table dives = { 0 };
- struct dive_site_table sites = { 0 };
+ struct dive_table dives = empty_dive_table;
+ struct dive_site_table sites = empty_dive_site_table;
move_dive_table(&diveTable, &dives);
move_dive_site_table(&sitesTable, &sites);