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>
This commit is contained in:
Dirk Hohndel 2020-01-08 21:25:02 -08:00
parent 70cabb968c
commit e1cd055111
13 changed files with 47 additions and 41 deletions

View file

@ -65,7 +65,7 @@ void DivesiteImportDialog::on_cancel_clicked()
void DivesiteImportDialog::on_ok_clicked()
{
// delete non-selected dive sites
struct dive_site_table selectedSites = { 0 };
struct dive_site_table selectedSites = empty_dive_site_table;
for (int i = 0; i < importedSites.nr; i++)
if (divesiteImportedModel->data(divesiteImportedModel->index(i, 0), Qt::CheckStateRole) == Qt::Checked) {
struct dive_site *newSite = alloc_dive_site();