From 2d89f5d6e90835466f12b68b556a44f671a6c844 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Wed, 18 Mar 2015 10:48:35 +0100 Subject: [PATCH] [Cleanup] [MeL/MeshEditing] Use stl function. --- MeshLib/MeshEditing/MeshRevision.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MeshLib/MeshEditing/MeshRevision.cpp b/MeshLib/MeshEditing/MeshRevision.cpp index aed80900938..29ce474f258 100644 --- a/MeshLib/MeshEditing/MeshRevision.cpp +++ b/MeshLib/MeshEditing/MeshRevision.cpp @@ -142,8 +142,7 @@ std::vector<std::size_t> MeshRevision::collapseNodeIndices(double eps) const std::vector<std::size_t> id_map(nNodes); const double half_eps(eps / 2.0); const double sqr_eps(eps*eps); - for (std::size_t k = 0; k < nNodes; ++k) - id_map[k] = k; + std::iota(id_map.begin(), id_map.end(), 0); GeoLib::Grid<MeshLib::Node> grid(nodes.begin(), nodes.end(), 64); -- GitLab