From 229d1da5ea4ebd657f8a17d5a8a43712f065bf11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Sat, 19 Jan 2019 18:06:40 +0100 Subject: [PATCH] use Range iterators --- libsrc/meshing/topology.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libsrc/meshing/topology.cpp b/libsrc/meshing/topology.cpp index 04962a57..dc57c347 100644 --- a/libsrc/meshing/topology.cpp +++ b/libsrc/meshing/topology.cpp @@ -581,7 +581,9 @@ namespace netgen // accumulate number of edges int ned = edge2vert.Size(); - for (size_t v = 0; v < mesh->GetNV(); v++) + + // for (size_t v = 0; v < mesh->GetNV(); v++) + for (size_t v : cnt.Range()) { auto hv = cnt[v]; cnt[v] = ned; @@ -755,7 +757,8 @@ namespace netgen // accumulate number of faces int nfa = oldnfa; // for (auto v : Range(mesh->GetNV())) // Points().Range()) - for (size_t v = 0; v < mesh->GetNV(); v++) + // for (size_t v = 0; v < mesh->GetNV(); v++) + for (auto v : cnt.Range()) { auto hv = cnt[v]; cnt[v] = nfa;