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:
Berthold Stoeger 2020-04-21 09:34:40 +02:00 committed by Dirk Hohndel
parent a8aa897117
commit 9b8eed7821
3 changed files with 6 additions and 6 deletions

View file

@ -2120,7 +2120,7 @@ void QMLManager::exportToFile(export_types type, QString dir, bool anonymize)
case EX_DIVE_SITES_XML:
{
std::vector<const dive_site *> sites = getDiveSitesToExport(false);
save_dive_sites_logic(qPrintable(fileName + ".xml"), &sites[0], (int)sites.size(), anonymize);
save_dive_sites_logic(qPrintable(fileName + ".xml"), sites.data(), (int)sites.size(), anonymize);
break;
}
case EX_UDDF: