From: Jean-Paul Pelteret Date: Thu, 2 Apr 2020 12:13:30 +0000 (+0200) Subject: Remove implicit cast from SymmetricTensor X-Git-Tag: v9.2.0-rc1~112^2~8 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0b3f088a0279bf9c67f795b9a09bd19cf439983;p=dealii.git Remove implicit cast from SymmetricTensor --- diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index 6fb2799a54..8788b60bad 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -3523,7 +3523,8 @@ DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE SymmetricTensor<2, dim, Number> SymmetricTensor<2, dim, Number> result; for (unsigned int d = 0; d < dim; ++d) result[d][d] = t[d][d]; - Number half = 0.5; + + const Number half = internal::NumberType::value(0.5); for (unsigned int d = 0; d < dim; ++d) for (unsigned int e = d + 1; e < dim; ++e) result[d][e] = (t[d][e] + t[e][d]) * half;