From 4df782615ce0186250e76f4f7390938a5021f478 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 13 Mar 2018 17:58:02 +0100 Subject: [PATCH 1/5] BUG: surface proxy zone handling with dangling? reference (closes #757) - using const reference to temporary was failing. Remedy by using a direct copy, which is a reasonable solution since surfZone content is quite minimal. --- src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C | 4 ++-- src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormat.C | 2 +- src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C | 2 +- src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.C | 2 +- src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.C | 2 +- src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.C | 2 +- src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.C | 2 +- src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.C | 4 ++-- src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.C | 2 +- src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C | 2 +- src/surfMesh/surfaceFormats/vtp/VTPsurfaceFormat.C | 2 +- src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.C | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C index 299e9a5333..e86bcc7962 100644 --- a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C @@ -312,7 +312,7 @@ void Foam::fileFormats::AC3DsurfaceFormat::write const pointField& pointLst = surf.points(); const UList& faceLst = surf.surfFaces(); - const UList& zones = + const surfZoneList zones = ( surf.surfZones().size() ? surf.surfZones() @@ -393,7 +393,7 @@ void Foam::fileFormats::AC3DsurfaceFormat::write if (zoneLst.size() <= 1) { - const List& zones = + const surfZoneList zones = ( zoneLst.size() ? zoneLst diff --git a/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormat.C b/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormat.C index b834b4ae5f..7225a47cc4 100644 --- a/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormat.C @@ -169,7 +169,7 @@ void Foam::fileFormats::FLMAsurfaceFormat::write const UList