From e1cd055111cc4f7e11454b3726741f9f8a55d850 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 8 Jan 2020 21:25:02 -0800 Subject: code cleanup: add empty table structures It seemed to make sense to combine all three types in one commit. Signed-off-by: Dirk Hohndel --- desktop-widgets/mainwindow.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'desktop-widgets/mainwindow.cpp') 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); -- cgit v1.2.3-70-g09d2