From 3dc2796e1a8d489a25e3db5d25b51d5ec3582f9a Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 12 Dec 2012 14:37:49 +0000 Subject: [PATCH] Removed two more occurences of inproper use of reinterpret_cast git-svn-id: https://svn.dealii.org/trunk@27800 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/work_stream.h | 4 ++-- deal.II/include/deal.II/meshworker/integration_info.h | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/deal.II/include/deal.II/base/work_stream.h b/deal.II/include/deal.II/base/work_stream.h index e81dc7c09b..c177fa92f6 100644 --- a/deal.II/include/deal.II/base/work_stream.h +++ b/deal.II/include/deal.II/base/work_stream.h @@ -342,7 +342,7 @@ namespace WorkStream typename IteratorRangeToItemStream::ItemType ItemType; - ItemType *current_item = reinterpret_cast (item); + ItemType *current_item = static_cast (item); // then call the worker function on // each element of the chunk we @@ -413,7 +413,7 @@ namespace WorkStream typename IteratorRangeToItemStream::ItemType ItemType; - ItemType *current_item = reinterpret_cast (item); + ItemType *current_item = static_cast (item); // initiate copying data for (unsigned int i=0; i(*current_item); ++i) diff --git a/deal.II/include/deal.II/meshworker/integration_info.h b/deal.II/include/deal.II/meshworker/integration_info.h index 65706f1438..e81efbf21f 100644 --- a/deal.II/include/deal.II/meshworker/integration_info.h +++ b/deal.II/include/deal.II/meshworker/integration_info.h @@ -740,9 +740,8 @@ namespace MeshWorker if (pc != 0) fevalv[i] = std_cxx1x::shared_ptr > ( - reinterpret_cast*>( new FEValues (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 > ( new FEFaceValues (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 > ( - reinterpret_cast*>( new FEValues (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 > ( - reinterpret_cast*>( new FEValues (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)); -- 2.39.5