]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a few more value initializations
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 13 Aug 2019 19:00:18 +0000 (15:00 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 13 Aug 2019 19:00:18 +0000 (15:00 -0400)
include/deal.II/base/tensor.h

index 36fca103da577e4763aaa89877e3df9e657de26d..441411e9c24a4a36f9d94b8a56cee83b617b5956 100644 (file)
@@ -1905,7 +1905,7 @@ DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE
   typename Tensor<rank_1 + rank_2 - 2,
                   dim,
                   typename ProductType<Number, OtherNumber>::type>::tensor_type
-    result;
+    result{};
 
   TensorAccessors::internal::
     ReorderedIndexView<0, rank_2, const Tensor<rank_2, dim, OtherNumber>>
@@ -1980,7 +1980,7 @@ DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE
   typename Tensor<rank_1 + rank_2 - 2,
                   dim,
                   typename ProductType<Number, OtherNumber>::type>::tensor_type
-    result;
+    result{};
   TensorAccessors::contract<1, rank_1, rank_2, dim>(result, reord_01, reord_02);
   return result;
 }
@@ -2184,7 +2184,7 @@ DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE
   typename Tensor<rank_1 + rank_2,
                   dim,
                   typename ProductType<Number, OtherNumber>::type>::tensor_type
-    result;
+    result{};
   TensorAccessors::contract<0, rank_1, rank_2, dim>(result, src1, src2);
   return result;
 }

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.