From 9b8eed7821c7e55c5e2eccd252184a6d2123e3cd Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 21 Apr 2020 09:34:40 +0200 Subject: cleanup: replace constructs of the type &vector[0] by vector.data() It appears that some misguided compiler / library combinations crash on &vector[0] for empty vectors. Even though very unfriendly, they are technically correct, so let's remove these constructs. Signed-off-by: Berthold Stoeger --- desktop-widgets/divelogexportdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets/divelogexportdialog.cpp') diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp index 6ff0f54bf..dec79113a 100644 --- a/desktop-widgets/divelogexportdialog.cpp +++ b/desktop-widgets/divelogexportdialog.cpp @@ -180,7 +180,7 @@ void DiveLogExportDialog::on_buttonBox_accepted() filename.append(".xml"); QByteArray bt = QFile::encodeName(filename); std::vector sites = getDiveSitesToExport(ui->exportSelected->isChecked()); - save_dive_sites_logic(bt.data(), &sites[0], (int)sites.size(), ui->anonymize->isChecked()); + save_dive_sites_logic(bt.data(), sites.data(), (int)sites.size(), ui->anonymize->isChecked()); } } else if (ui->exportImageDepths->isChecked()) { filename = QFileDialog::getSaveFileName(this, tr("Save image depths"), lastDir); -- cgit v1.2.3-70-g09d2