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

@ -294,7 +294,7 @@ int removeWeight(int index, bool currentDiveOnly)
int editWeight(int index, weightsystem_t ws, bool currentDiveOnly)
{
return execute_edit(new EditWeight(index, ws, currentDiveOnly));
return execute_edit(new EditWeight(index, std::move(ws), currentDiveOnly));
}
int addCylinder(bool currentDiveOnly)
@ -309,7 +309,7 @@ int removeCylinder(int index, bool currentDiveOnly)
int editCylinder(int index, cylinder_t cyl, EditCylinderType type, bool currentDiveOnly)
{
return execute_edit(new EditCylinder(index, cyl, type, currentDiveOnly));
return execute_edit(new EditCylinder(index, std::move(cyl), type, currentDiveOnly));
}
void editSensors(int toCylinder, int fromCylinder, int dcNr)