]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check the result of a dynamic_cast. 6181/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 6 Apr 2018 13:13:51 +0000 (15:13 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 6 Apr 2018 13:13:51 +0000 (15:13 +0200)
source/fe/mapping_q.cc

index 9fd1fbc34a2c2ca87b82f25aca278fdac0f40134..6f3f183599da037aad52a1593105150f5ad3e94d 100644 (file)
@@ -374,10 +374,9 @@ transform (const ArrayView<const Tensor<1,dim> >                  &input,
            const ArrayView<Tensor<1,spacedim> >                   &output) const
 {
   AssertDimension (input.size(), output.size());
-  Assert ((dynamic_cast<const typename MappingQ<dim,spacedim>::InternalData *> (&mapping_data)
-           != nullptr),
-          ExcInternalError());
+
   const InternalData *data = dynamic_cast<const InternalData *>(&mapping_data);
+  Assert (data != nullptr, ExcInternalError());
 
   // check whether we should in fact work on the Q1 portion of it
   if (data->use_mapping_q1_on_current_cell)

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.