]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Removed two more occurences of inproper use of reinterpret_cast
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 12 Dec 2012 14:37:49 +0000 (14:37 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 12 Dec 2012 14:37:49 +0000 (14:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@27800 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/work_stream.h
deal.II/include/deal.II/meshworker/integration_info.h

index e81dc7c09bb35c91b95df6a3d74d72eb57e2be69..c177fa92f6a8353e9a9a6617041532bdaaefe62f 100644 (file)
@@ -342,7 +342,7 @@ namespace WorkStream
         typename IteratorRangeToItemStream<Iterator,ScratchData,CopyData>::ItemType
         ItemType;
 
-        ItemType *current_item = reinterpret_cast<ItemType *> (item);
+        ItemType *current_item = static_cast<ItemType *> (item);
 
         // then call the worker function on
         // each element of the chunk we
@@ -413,7 +413,7 @@ namespace WorkStream
         typename IteratorRangeToItemStream<Iterator,ScratchData,CopyData>::ItemType
         ItemType;
 
-        ItemType *current_item = reinterpret_cast<ItemType *> (item);
+        ItemType *current_item = static_cast<ItemType *> (item);
 
         // initiate copying data
         for (unsigned int i=0; i<std_cxx1x::get<3>(*current_item); ++i)
index 65706f14381b33c6a1480f575a3fffd8eab05c42..e81efbf21f9523ffaac251c7a6fd2483ae2c19b6 100644 (file)
@@ -740,9 +740,8 @@ namespace MeshWorker
 
         if (pc != 0)
           fevalv[i] = std_cxx1x::shared_ptr<FEValuesBase<dim,sdim> > (
-                        reinterpret_cast<FEFaceValuesBase<dim,sdim>*>(
                           new FEValues<dim,sdim> (pc->get_mapping(), pc->get_fe(),
-                                                  pc->get_quadrature(), pc->get_update_flags())));
+                                                  pc->get_quadrature(), pc->get_update_flags()));
         else if (pf != 0)
           fevalv[i] = std_cxx1x::shared_ptr<FEValuesBase<dim,sdim> > (
                         new FEFaceValues<dim,sdim> (pf->get_mapping(), pf->get_fe(), pf->get_quadrature(), pf->get_update_flags()));
@@ -779,9 +778,8 @@ namespace MeshWorker
 
         if (pc != 0)
           fevalv[i] = std_cxx1x::shared_ptr<FEValuesBase<dim,sdim> > (
-                        reinterpret_cast<FEFaceValuesBase<dim,sdim>*>(
                           new FEValues<dim,sdim> (pc->get_mapping(), pc->get_fe(),
-                                                  pc->get_quadrature(), pc->get_update_flags())));
+                                                  pc->get_quadrature(), pc->get_update_flags()));
         else if (pf != 0)
           {
             Assert (false, ExcImpossibleInDim(1));
@@ -822,9 +820,8 @@ namespace MeshWorker
 
         if (pc != 0)
           fevalv[i] = std_cxx1x::shared_ptr<FEValuesBase<dim,sdim> > (
-                        reinterpret_cast<FEFaceValuesBase<dim,sdim>*>(
                           new FEValues<dim,sdim> (pc->get_mapping(), pc->get_fe(),
-                                                  pc->get_quadrature(), pc->get_update_flags())));
+                                                  pc->get_quadrature(), pc->get_update_flags()));
         else if (pf != 0)
           {
             Assert (false, ExcImpossibleInDim(1));

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.