Code adjustments to avoid gcc-13 warnings about dangling references

This commit is contained in:
Mattijs Janssens
2024-01-11 10:08:45 +00:00
committed by Mark OLESEN
parent 89cd584440
commit bb16c493b7
42 changed files with 192 additions and 133 deletions

View File

@ -482,8 +482,8 @@ void Foam::searchableSurfaceControl::cellSizeFunctionVertices
DynamicList<scalar>& sizes
) const
{
const tmp<pointField> tmpPoints = searchableSurface_.points();
const pointField& points = tmpPoints();
const tmp<pointField> tpoints(searchableSurface_.points());
const pointField& points = tpoints();
const scalar nearFeatDistSqrCoeff = 1e-8;

View File

@ -110,7 +110,8 @@ Foam::scalar Foam::nonUniformField::interpolate
{
const face& faceHitByPt = surfaceTriMesh_.triSurface::operator[](index);
const pointField& pts = surfaceTriMesh_.points();
const tmp<pointField> tpoints(surfaceTriMesh_.points());
const pointField& pts = tpoints();
// const Map<label>& pMap = surfaceTriMesh_.meshPointMap();
triPointRef tri

View File

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

View File

@ -1371,7 +1371,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findRemainingProtrusionSet
protrudingCells.write();
}
return std::move(protrudingCells);
return protrudingCells;
}