diff options
-rw-r--r-- | desktop-widgets/divelogexportdialog.cpp | 2 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 2 | ||||
-rw-r--r-- | qt-models/cylindermodel.cpp | 8 |
3 files changed, 6 insertions, 6 deletions
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<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); 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: diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp index 04abe2fdb..6759670c6 100644 --- a/qt-models/cylindermodel.cpp +++ b/qt-models/cylindermodel.cpp @@ -548,8 +548,8 @@ void CylindersModel::remove(QModelIndex index) endRemoveRows(); std::vector<int> mapping = get_cylinder_map_for_remove(d->cylinders.nr + 1, index.row()); - cylinder_renumber(d, &mapping[0]); - DivePlannerPointsModel::instance()->cylinderRenumber(&mapping[0]); + cylinder_renumber(d, mapping.data()); + DivePlannerPointsModel::instance()->cylinderRenumber(mapping.data()); } void CylindersModel::cylinderAdded(struct dive *changed, int pos) @@ -601,9 +601,9 @@ void CylindersModel::moveAtFirst(int cylid) std::iota(mapping.begin(), mapping.begin() + cylid, 1); mapping[cylid] = 0; std::iota(mapping.begin() + (cylid + 1), mapping.end(), cylid); - cylinder_renumber(d, &mapping[0]); + cylinder_renumber(d, mapping.data()); if (inPlanner) - DivePlannerPointsModel::instance()->cylinderRenumber(&mapping[0]); + DivePlannerPointsModel::instance()->cylinderRenumber(mapping.data()); endMoveRows(); } |