mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
code cleanup: use std::move() to potentially void copies
Found by Coverity. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
2d5094a48b
commit
d295ca1d17
5 changed files with 8 additions and 8 deletions
|
@ -469,11 +469,11 @@ bool CylindersModel::setData(const QModelIndex &index, const QVariant &value, in
|
|||
|
||||
if (inPlanner) {
|
||||
// In the planner - simply overwrite the cylinder in the dive with the modified cylinder.
|
||||
*d->get_cylinder(row) = cyl;
|
||||
*d->get_cylinder(row) = std::move(cyl);
|
||||
dataChanged(index, index);
|
||||
} else {
|
||||
// On the EquipmentTab - place an editCylinder command.
|
||||
int count = Command::editCylinder(index.row(), cyl, type, false);
|
||||
int count = Command::editCylinder(index.row(), std::move(cyl), type, false);
|
||||
emit divesEdited(count);
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue