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:
Berthold Stoeger 2024-08-17 22:00:41 +02:00 committed by bstoeger
parent 2d5094a48b
commit d295ca1d17
5 changed files with 8 additions and 8 deletions

View file

@ -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;