]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Work on warning 10946/head
authorPeter Munch <peterrmuench@gmail.com>
Wed, 23 Sep 2020 11:24:34 +0000 (13:24 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 23 Sep 2020 11:24:34 +0000 (13:24 +0200)
include/deal.II/matrix_free/evaluation_kernels.h
include/deal.II/matrix_free/fe_evaluation.h

index 7877ae06b44b2413e09b961cc3278124b7870b63..a30377f1e819673b703ea5fdb85bfa99054cc9fe 100644 (file)
@@ -2586,8 +2586,7 @@ namespace internal
     const unsigned int dummy = 0;
 
     // re-orientation
-    std::array<const unsigned int *, n_face_orientations> orientation;
-    std::fill(orientation.begin(), orientation.end(), nullptr);
+    std::array<const unsigned int *, n_face_orientations> orientation = {};
 
     if (n_face_orientations == 1)
       orientation[0] = (data.data.front().nodal_at_cell_boundaries == true) ?
@@ -2611,8 +2610,8 @@ namespace internal
       }
 
     // face_to_cell_index_hermite
-    std::array<const unsigned int *, n_face_orientations> index_array_hermite;
-    std::fill(index_array_hermite.begin(), index_array_hermite.end(), nullptr);
+    std::array<const unsigned int *, n_face_orientations> index_array_hermite =
+      {};
 
     if (n_face_orientations == 1)
       index_array_hermite[0] =
@@ -2641,8 +2640,8 @@ namespace internal
       }
 
     // face_to_cell_index_nodal
-    std::array<const unsigned int *, n_face_orientations> index_array_nodal;
-    std::fill(index_array_nodal.begin(), index_array_nodal.end(), nullptr);
+    std::array<const unsigned int *, n_face_orientations> index_array_nodal =
+      {};
 
     if (n_face_orientations == 1)
       index_array_nodal[0] =
index 049c8c9cf9fe84f54cfb5733edb125a632944fe5..6ca84eb940efdb8ab0a2d4e4178ab21dc84612f9 100644 (file)
@@ -8496,13 +8496,10 @@ FEFaceEvaluation<dim,
       {
         // TODO: this copying should not be necessary once we have introduced
         // an internal-data structure
-        std::array<unsigned int, VectorizedArrayType::size()> cells_;
-        std::array<unsigned int, VectorizedArrayType::size()> face_no_;
-        std::array<unsigned int, VectorizedArrayType::size()> face_orientation_;
-
-        std::fill(cells_.begin(), cells_.end(), -1);
-        std::fill(face_no_.begin(), face_no_.end(), -1);
-        std::fill(face_orientation_.begin(), face_orientation_.end(), -1);
+        std::array<unsigned int, VectorizedArrayType::size()> cells_   = {};
+        std::array<unsigned int, VectorizedArrayType::size()> face_no_ = {};
+        std::array<unsigned int, VectorizedArrayType::size()>
+          face_orientation_ = {};
 
         cells_[0]            = this->cell;
         face_no_[0]          = this->face_no;
@@ -8629,13 +8626,9 @@ FEFaceEvaluation<dim,
 
   // TODO: this copying should not be necessary once we have introduced
   // an internal-data structure
-  std::array<unsigned int, VectorizedArrayType::size()> cells_;
-  std::array<unsigned int, VectorizedArrayType::size()> face_no_;
-  std::array<unsigned int, VectorizedArrayType::size()> face_orientation_;
-
-  std::fill(cells_.begin(), cells_.end(), -1);
-  std::fill(face_no_.begin(), face_no_.end(), -1);
-  std::fill(face_orientation_.begin(), face_orientation_.end(), -1);
+  std::array<unsigned int, VectorizedArrayType::size()> cells_            = {};
+  std::array<unsigned int, VectorizedArrayType::size()> face_no_          = {};
+  std::array<unsigned int, VectorizedArrayType::size()> face_orientation_ = {};
 
   cells_[0]            = this->cell;
   face_no_[0]          = this->face_no;

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.