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
|
@ -88,7 +88,7 @@ void WeightModel::setTempWS(int row, weightsystem_t ws)
|
|||
const weightsystem_t &oldWS = d->weightsystems[row];
|
||||
if (oldWS.description != ws.description) {
|
||||
tempRow = row;
|
||||
tempWS = ws;
|
||||
tempWS = std::move(ws);
|
||||
|
||||
// If the user had already set a weight, don't overwrite that
|
||||
if (oldWS.weight.grams && !oldWS.auto_filled)
|
||||
|
@ -133,7 +133,7 @@ bool WeightModel::setData(const QModelIndex &index, const QVariant &value, int r
|
|||
case WEIGHT:
|
||||
ws.weight = string_to_weight(qPrintable(vString));
|
||||
ws.auto_filled = false;
|
||||
int count = Command::editWeight(index.row(), ws, false);
|
||||
int count = Command::editWeight(index.row(), std::move(ws), false);
|
||||
emit divesEdited(count);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue