From 0c1943c77b6d85187a9f62f7408655a4551144d5 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Tue, 3 Dec 2024 12:50:14 +0100 Subject: [PATCH] Fix bug in nginterface (discovered by gcc -Wall) --- libsrc/interface/nginterface.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libsrc/interface/nginterface.cpp b/libsrc/interface/nginterface.cpp index 5181be4c..1c79ff78 100644 --- a/libsrc/interface/nginterface.cpp +++ b/libsrc/interface/nginterface.cpp @@ -2246,11 +2246,8 @@ int Ng_GetClosureNodes (int nt, int nodenr, int nodeset, int * nodes) if (nodeset & 2) // Edges { - int edges[12]; - // int ned; - // ned = mesh->GetTopology().GetElementEdges (nodenr+1, edges, 0); - int ned = mesh->GetTopology().GetEdges (ElementIndex(nodenr)).Size(); - for (int i = 0; i < ned; i++) + auto edges = mesh->GetTopology().GetEdges (ElementIndex(nodenr)); + for (int i = 0; i < edges.Size(); i++) { nodes[cnt++] = 1; nodes[cnt++] = edges[i]-1;