]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bugfix: Use generic initializer in Tensor::norm() 1517/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 7 Sep 2015 19:13:59 +0000 (14:13 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 7 Sep 2015 19:13:59 +0000 (14:13 -0500)
include/deal.II/base/tensor.h

index 84a2855aa34dc7e30dabfb184b1ca349fb90fb55..cec13691a6a325514215bba8895822e36a20d1e4 100644 (file)
@@ -1070,7 +1070,7 @@ inline
 typename Tensor<rank_,dim,Number>::real_type
 Tensor<rank_,dim,Number>::norm_square () const
 {
-  real_type s = 0;
+  real_type s = real_type();
   for (unsigned int i=0; i<dim; ++i)
     s += values[i].norm_square();
 

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.