From 65a474b8ef0341b0a8c7bdb7c47959d9243f0270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Tue, 4 Apr 2017 11:34:24 +0200 Subject: [PATCH] avoid shared-ptr copy --- libsrc/visualization/vssolution.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libsrc/visualization/vssolution.cpp b/libsrc/visualization/vssolution.cpp index ad5223bb..95c81740 100644 --- a/libsrc/visualization/vssolution.cpp +++ b/libsrc/visualization/vssolution.cpp @@ -3350,8 +3350,6 @@ namespace netgen double lam1, double lam2, int comp, double & val) const { - shared_ptr mesh = GetMesh(); - bool ok; if (comp == 0) { @@ -3399,6 +3397,7 @@ namespace netgen case SOL_NODAL: { + shared_ptr mesh = GetMesh(); const Element2d & el = (*mesh)[selnr]; double lami[8]; @@ -3457,6 +3456,7 @@ namespace netgen case SOL_ELEMENT: { + shared_ptr mesh = GetMesh(); int el1, el2; mesh->GetTopology().GetSurface2VolumeElement (selnr+1, el1, el2); el1--; @@ -3480,6 +3480,7 @@ namespace netgen case SOL_SURFACE_NONCONTINUOUS: { + shared_ptr mesh = GetMesh(); const Element2d & el = (*mesh)[selnr]; double lami[8]; @@ -3554,12 +3555,14 @@ namespace netgen case SOL_MARKED_ELEMENTS: { + shared_ptr mesh = GetMesh(); val = (*mesh)[selnr].TestRefinementFlag(); return 1; } case SOL_ELEMENT_ORDER: - { + { + shared_ptr mesh = GetMesh(); val = (*mesh)[selnr].GetOrder(); return 1; }