COMP: use std::move() explicitly to avoid copying

This commit is contained in:
Mark Olesen
2019-01-02 15:56:54 +01:00
parent f67f36c63a
commit e2bc0b55b9
5 changed files with 15 additions and 15 deletions

View File

@ -988,7 +988,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findOffsetPatchFaces
offsetBoundaryCells.write();
}
return offsetBoundaryCells;
return std::move(offsetBoundaryCells);
}

View File

@ -1355,11 +1355,10 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findRemainingProtrusionSet
protrudingCells.insert(pCells);
}
label protrudingCellsSize = protrudingCells.size();
const label protrudingCellsSize =
returnReduce(protrudingCells.size(), sumOp<label>());
reduce(protrudingCellsSize, sumOp<label>());
if (foamyHexMeshControls().objOutput() && protrudingCellsSize > 0)
if (foamyHexMeshControls().objOutput() && protrudingCellsSize)
{
Info<< nl << "Found " << protrudingCellsSize
<< " cells protruding from the surface, writing cellSet "
@ -1369,7 +1368,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findRemainingProtrusionSet
protrudingCells.write();
}
return protrudingCells;
return std::move(protrudingCells);
}

View File

@ -363,7 +363,7 @@ CGAL::indexedCell<Gt, Cb>::globallyOrderedCellVertices
tVGI[i] = vertexMap[i];
}
return tVGI;
return std::move(tVGI);
}