]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Disambiguate call to std::pow.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 28 Jun 2009 19:17:36 +0000 (19:17 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 28 Jun 2009 19:17:36 +0000 (19:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@18982 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/tensor.h

index 05ee127247b8b760458fb09dd202264a19ee27fa..95553ae6c3f69d7d9355592493ec577b4bf92de6 100644 (file)
@@ -1436,13 +1436,13 @@ double determinant (const Tensor<2,dim> &t)
        for (unsigned int j=0; j<dim-1; ++j)
          minor[i][j] = t[i][j<k ? j : j+1];
 
-      const double cofactor = std::pow (-1, k+1) *
+      const double cofactor = std::pow (-1., static_cast<double>(k+1)) *
                              determinant (minor);
 
       det += t[dim-1][k] * cofactor;
     }
   
-  return std::pow (-1, dim) * det;
+  return std::pow (-1., static_cast<double>(dim)) * det;
 }
 
 

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.