]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add explicit cast.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 21 Aug 2009 17:23:32 +0000 (17:23 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 21 Aug 2009 17:23:32 +0000 (17:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@19331 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_generator.cc

index 586f3dcd26b36c248d44b9bb98408c1febcec3a9..4c908edcb75d5cba416f8b0b40312b139c4eef0b 100644 (file)
@@ -1870,7 +1870,10 @@ void GridGenerator::truncated_cone (Triangulation<dim> &triangulation,
 {
   Assert (dim <= 3, ExcNotImplemented());
                                   // Determine number of cells and vertices
-  const unsigned int n_cells = std::floor (half_length / std::max (radius_0, radius_1) + 0.5);
+  const unsigned int n_cells = static_cast<unsigned int>(std::floor (half_length /
+                                                                    std::max (radius_0,
+                                                                              radius_1) +
+                                                                    0.5));
   const unsigned int n_vertices = 4 * (n_cells + 1);
   std::vector<Point<dim> > vertices_tmp(n_vertices);
 

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.