From fd9af3a4d22bbc304798421b1ccaa98655185953 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 6 Sep 2015 21:02:51 -0500 Subject: [PATCH] Bugfix: Avoid temporaries --- include/deal.II/base/tensor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } //@} -- 2.39.5