]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid warning for double->int conversion.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 5 Oct 2000 16:18:45 +0000 (16:18 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 5 Oct 2000 16:18:45 +0000 (16:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@3377 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/tensor.cc

index bcab0b9673134db9c422114b8bd0ab244e006a8b..2a84b3809ccf313aa347b3b246e02bec51b4103c 100644 (file)
@@ -29,18 +29,21 @@ Tensor<1,dim>::unroll( Vector<double>& result) const
 }
 
 
+
 template <int rank_, int dim>
 void
 Tensor<rank_, dim>::unroll( Vector<double>& result) const
 {
   Assert(result.size()==pow(dim,rank_),
-        ExcWrongVectorSize(pow(dim,rank_), result.size()));
+        ExcWrongVectorSize(static_cast<unsigned int>(pow(dim,rank_)),
+                           result.size()));
 
   unsigned index = 0;
   unroll_recursion(result,index);
 }
 
 
+
 template <int rank_, int dim>
 void
 Tensor<rank_, dim>::unroll_recursion( Vector<double>& result, unsigned& index) const
@@ -53,16 +56,13 @@ Tensor<rank_, dim>::unroll_recursion( Vector<double>& result, unsigned& index) c
 }
 
 
+
 template<int dim>
 void
 Tensor<1,dim>::unroll_recursion( Vector<double>& result, unsigned& index) const
 {
   for (unsigned i=0; i<dim; ++i)
-    {
-//      cerr << "[" << index << ',' << operator[](i) << ']' << endl;
-      result(index++) = operator[](i);
-    }
-  
+    result(index++) = operator[](i);  
 }
 
 

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.