]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use manifold iterator range in copy_triangulation(). 11946/head
authorMarc Fehling <mafehling.git@gmail.com>
Sat, 20 Mar 2021 00:22:58 +0000 (18:22 -0600)
committerMarc Fehling <mafehling.git@gmail.com>
Sat, 20 Mar 2021 22:49:46 +0000 (16:49 -0600)
source/grid/tria.cc

index 04b4481073deca179f754af886c500e922df58fc..129d57cfb84a889821e5d22f6130fedaa462f038 100644 (file)
@@ -10429,9 +10429,8 @@ Triangulation<dim, spacedim>::copy_triangulation(
     faces = std::make_unique<internal::TriangulationImplementation::TriaFaces>(
       *other_tria.faces);
 
-  auto bdry_iterator = other_tria.manifold.begin();
-  for (; bdry_iterator != other_tria.manifold.end(); ++bdry_iterator)
-    manifold[bdry_iterator->first] = bdry_iterator->second->clone();
+  for (const auto &p : other_tria.manifold)
+    set_manifold(p.first, *p.second);
 
 
   levels.reserve(other_tria.levels.size());

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.