summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.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 /desktop-widgets/mainwindow.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 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index ddb174984..0b7975054 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -1662,9 +1662,9 @@ void MainWindow::importFiles(const QStringList fileNames)
return;
QByteArray fileNamePtr;
- struct dive_table table = { 0 };
- struct trip_table trips = { 0 };
- struct dive_site_table sites = { 0 };
+ struct dive_table table = empty_dive_table;
+ struct trip_table trips = empty_trip_table;
+ struct dive_site_table sites = empty_dive_site_table;
for (int i = 0; i < fileNames.size(); ++i) {
fileNamePtr = QFile::encodeName(fileNames.at(i));
@@ -1757,9 +1757,9 @@ void MainWindow::on_actionImportDiveSites_triggered()
return;
updateLastUsedDir(QFileInfo(fileNames[0]).dir().path());
- struct dive_table table = { 0 };
- struct trip_table trips = { 0 };
- struct dive_site_table sites = { 0 };
+ struct dive_table table = empty_dive_table;
+ struct trip_table trips = empty_trip_table;
+ struct dive_site_table sites = empty_dive_site_table;
for (const QString &s: fileNames) {
QByteArray fileNamePtr = QFile::encodeName(s);