]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify a piece of code. 10866/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 31 Aug 2020 23:34:25 +0000 (17:34 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 31 Aug 2020 23:42:01 +0000 (17:42 -0600)
source/base/bounding_box.cc

index 4ad11f15ebc6aa9dcbb5356dd72f678f8b50f3af..06aae4e4b7bab0406104bb13bf0e92ab8cecb0c7 100644 (file)
@@ -70,12 +70,12 @@ BoundingBox<spacedim, Number>::get_neighbor_type(
     }
   else
     {
-      std::array<Point<spacedim, Number>, 2> bbox1;
-      bbox1[0] = this->get_boundary_points().first;
-      bbox1[1] = this->get_boundary_points().second;
-      std::array<Point<spacedim, Number>, 2> bbox2;
-      bbox2[0] = other_bbox.get_boundary_points().first;
-      bbox2[1] = other_bbox.get_boundary_points().second;
+      const std::array<Point<spacedim, Number>, 2> bbox1 = {
+        {this->get_boundary_points().first,
+         this->get_boundary_points().second}};
+      const std::array<Point<spacedim, Number>, 2> bbox2 = {
+        {other_bbox.get_boundary_points().first,
+         other_bbox.get_boundary_points().second}};
 
       // Step 1: testing if the boxes are close enough to intersect
       for (unsigned int d = 0; d < spacedim; ++d)

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.