diff --git a/libsrc/general/template.hpp b/libsrc/general/template.hpp index 534fa6e6..afca79c7 100644 --- a/libsrc/general/template.hpp +++ b/libsrc/general/template.hpp @@ -166,13 +166,19 @@ public: friend ostream & operator<<(ostream & s, const INDEX_2 & i2); }; - + /* inline INDEX_2 Sort (const INDEX_2 & i2) { INDEX_2 tmp = i2; tmp.Sort(); return tmp; } + */ +inline INDEX_2 Sort (INDEX_2 i2) +{ + i2.Sort(); + return i2; +} inline bool operator< (const INDEX_2 ia, const INDEX_2 ib) { diff --git a/libsrc/meshing/delaunay.cpp b/libsrc/meshing/delaunay.cpp index 9aa14f81..4ae55439 100644 --- a/libsrc/meshing/delaunay.cpp +++ b/libsrc/meshing/delaunay.cpp @@ -790,9 +790,13 @@ namespace netgen double r2 = Dist2 (*pp[0], pc); if (hasclose) + /* for (int k = 1; k <= closesphere.GetArray().Size(); k++) { int csameind = closesphere.GetArray().Get(k); + */ + for (int csameind : closesphere.GetArray()) + { if (!insphere.IsIn(csameind) && fabs (r2 - radi2.Get(csameind)) < 1e-10 && Dist2 (pc, centers.Get(csameind)) < 1e-20)