diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-21 09:34:40 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-21 07:50:38 -0700 |
commit | 9b8eed7821c7e55c5e2eccd252184a6d2123e3cd (patch) | |
tree | 8e080b1ca4a2daad4eaff069287894ed1990f0ad /mobile-widgets/qmlmanager.cpp | |
parent | a8aa8971176239fa4d428aaa4599d1f996e11885 (diff) | |
download | subsurface-9b8eed7821c7e55c5e2eccd252184a6d2123e3cd.tar.gz |
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>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 0e7e16ddb..8e614ec2b 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -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: |