]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CGAL: avoid a compiler warning
authorMatthias Maier <tamiko@43-1.org>
Sun, 25 Sep 2022 18:29:40 +0000 (13:29 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sun, 25 Sep 2022 18:29:40 +0000 (13:29 -0500)
Avoid an unnecessary copy:

source/cgal/intersections.cc:555:25: note: use reference type to prevent copying
  555 |         for (const auto f : tria_quad.finite_facets())
      |                         ^
      |                         &

source/cgal/intersections.cc

index fbf5dd76b17c9a4240fca225920107182966f0c3..f3ea9d9d90eb0f091c438062250b2da5212f8517 100644 (file)
@@ -552,7 +552,7 @@ namespace CGALWrappers
       {
         const auto &tet = tria.tetrahedron(c);
 
-        for (const auto f : tria_quad.finite_facets())
+        for (const auto &f : tria_quad.finite_facets())
           {
             if (CGAL::do_intersect(tet, tria_quad.triangle(f)))
               {

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.