]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bugfix: Be consistent and cast to const Number & 1587/head
authorMatthias Maier <tamiko@43-1.org>
Sat, 12 Sep 2015 06:42:34 +0000 (01:42 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sat, 12 Sep 2015 06:42:34 +0000 (01:42 -0500)
include/deal.II/base/tensor.h

index 679909871a7a0577b1c6ea21d43506573f981d3b..cb1de1852ca596b5bd5a173ee6577eb80682e9df 100644 (file)
@@ -1288,7 +1288,7 @@ Tensor<0,dim,typename ProductType<typename EnableIfScalar<OtherNumber>::type, Nu
 operator * (const OtherNumber           factor,
             const Tensor<0,dim,Number> &t)
 {
-  return factor * static_cast<Number>(t);
+  return factor * static_cast<const Number &>(t);
 }
 
 
@@ -1304,7 +1304,7 @@ Tensor<0,dim,typename ProductType<Number, typename EnableIfScalar<OtherNumber>::
 operator * (const Tensor<0,dim,Number> &t,
             const OtherNumber           factor)
 {
-  return static_cast<Number>(t) * factor;
+  return static_cast<const Number &>(t) * factor;
 }
 
 

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.