From: Jean-Paul Pelteret Date: Sat, 1 Feb 2020 19:06:18 +0000 (+0100) Subject: Use constructor instead of operator= in SymmetricTensor operations X-Git-Tag: v9.2.0-rc1~569^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e545f3bc01481bbf3db6ad45531026090b4d27ba;p=dealii.git Use constructor instead of operator= in SymmetricTensor operations --- diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index 9371c3dd02..c9c9f9424d 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -3587,7 +3587,7 @@ operator/(const SymmetricTensor &t, const OtherNumber & factor) { using product_type = typename ProductType::type; - SymmetricTensor tt = t; + SymmetricTensor tt(t); tt /= internal::NumberType::value(factor); return tt; } @@ -3604,7 +3604,7 @@ template DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE SymmetricTensor operator*(const SymmetricTensor &t, const double factor) { - SymmetricTensor tt = t; + SymmetricTensor tt(t); tt *= factor; return tt; } @@ -3621,7 +3621,7 @@ template DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE SymmetricTensor operator*(const double factor, const SymmetricTensor &t) { - SymmetricTensor tt = t; + SymmetricTensor tt(t); tt *= factor; return tt; } @@ -3637,7 +3637,7 @@ template DEAL_II_CONSTEXPR inline SymmetricTensor operator/(const SymmetricTensor &t, const double factor) { - SymmetricTensor tt = t; + SymmetricTensor tt(t); tt /= factor; return tt; }