mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: return unique_ptr<> from merge-dive functions
Try to remove plain owning pointers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1e09ec77d7
commit
aa60e5d21d
6 changed files with 184 additions and 195 deletions
|
@ -547,7 +547,7 @@ void CylindersModel::remove(QModelIndex index)
|
|||
endRemoveRows();
|
||||
|
||||
std::vector<int> mapping = get_cylinder_map_for_remove(static_cast<int>(d->cylinders.size() + 1), index.row());
|
||||
cylinder_renumber(d, mapping.data());
|
||||
cylinder_renumber(*d, mapping.data());
|
||||
DivePlannerPointsModel::instance()->cylinderRenumber(mapping.data());
|
||||
}
|
||||
|
||||
|
@ -621,7 +621,7 @@ 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.data());
|
||||
cylinder_renumber(*d, mapping.data());
|
||||
if (inPlanner)
|
||||
DivePlannerPointsModel::instance()->cylinderRenumber(mapping.data());
|
||||
endMoveRows();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue