]> https://gitweb.dealii.org/ - dealii.git/commitdiff
simplify cast 394/head
authorTimo Heister <timo.heister@gmail.com>
Wed, 31 Dec 2014 13:50:12 +0000 (08:50 -0500)
committerTimo Heister <timo.heister@gmail.com>
Wed, 31 Dec 2014 14:27:42 +0000 (09:27 -0500)
source/distributed/solution_transfer.cc

index 3455251bf1ba9d89a3975196512a6a767f3b4812..4a4e380a80406d85d322fafd2df5bc91df05dddb 100644 (file)
@@ -48,11 +48,9 @@ namespace parallel
       :
       dof_handler(&dof, typeid(*this).name())
     {
-      parallel::distributed::Triangulation<dim> *tria
-        = (dynamic_cast<parallel::distributed::Triangulation<dim>*>
-           (const_cast<dealii::Triangulation<dim>*>
-            (&dof_handler->get_tria())));
-      Assert (tria != 0, ExcMessage("parallel::distributed::SolutionTransfer requires a parallel::distributed::Triangulation object."));
+      Assert (dynamic_cast<const parallel::distributed::Triangulation<dim>*>
+              (&dof_handler->get_tria()) != 0,
+              ExcMessage("parallel::distributed::SolutionTransfer requires a parallel::distributed::Triangulation object."));
     }
 
 

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.