mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
a8aa897117
commit
9b8eed7821
3 changed files with 6 additions and 6 deletions
|
@ -180,7 +180,7 @@ void DiveLogExportDialog::on_buttonBox_accepted()
|
|||
filename.append(".xml");
|
||||
QByteArray bt = QFile::encodeName(filename);
|
||||
std::vector<const dive_site *> 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue