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

@ -221,9 +221,10 @@ void detectSelfIntersections
const edgeList& edges = s.edges();
const indexedOctree<treeDataTriSurface>& tree = s.tree();
const labelList& meshPoints = s.meshPoints();
const pointField& points = s.points();
const tmp<pointField> tpoints(s.points());
const pointField& points = tpoints();
isEdgeIntersecting.setSize(edges.size());
isEdgeIntersecting.resize_nocopy(edges.size());
isEdgeIntersecting = false;
forAll(edges, edgeI)
@ -311,7 +312,8 @@ label detectIntersectionPoints
detectSelfIntersections(s, isEdgeIntersecting);
const edgeList& edges = s.edges();
const pointField& points = s.points();
const tmp<pointField> tpoints(s.points());
const pointField& points = tpoints();
forAll(edges, edgeI)
{
@ -836,9 +838,10 @@ int main(int argc, char *argv[])
// Do some smoothing (Lloyds algorithm)
lloydsSmoothing(nSmooth, s, isFeaturePoint, edgeStat, isAffectedPoint);
// Update pointDisplacement
const pointField& pts = s.points();
const tmp<pointField> tpoints(s.points());
const pointField& pts = tpoints();
forAll(meshPoints, i)
{
label meshPointI = meshPoints[i];