From: Matthias Maier Date: Mon, 7 Sep 2015 02:02:51 +0000 (-0500) Subject: Bugfix: Avoid temporaries X-Git-Tag: v8.4.0-rc2~466^2~12 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd9af3a4d22bbc304798421b1ccaa98655185953;p=dealii.git Bugfix: Avoid temporaries --- diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index a2a3ba0f8a..d386528603 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -140,7 +140,7 @@ inline Tensor<0, dim, typename ProductType::type> operator+ (const Tensor<0,dim,Number> &p, const Tensor<0,dim,OtherNumber> &q) { - return static_cast(p) + static_cast(q); + return static_cast(p) + static_cast(q); } @@ -154,7 +154,7 @@ inline Tensor<0, dim, typename ProductType::type> operator- (const Tensor<0,dim,Number> &p, const Tensor<0,dim,OtherNumber> &q) { - return static_cast(p) - static_cast(q); + return static_cast(p) - static_cast(q); } @@ -174,7 +174,7 @@ inline typename ProductType::type operator* (const Tensor<0,dim,Number> &p, const Tensor<0,dim,OtherNumber> &q) { - return static_cast(p) * static_cast(q); + return static_cast(p) * static_cast(q); } //@}