From: kronbichler Date: Wed, 12 Dec 2012 13:55:01 +0000 (+0000) Subject: Avoid some more reinterpret_cast X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a88810ecbd60ebdaab0374785144f472433e7deb;p=dealii-svn.git Avoid some more reinterpret_cast git-svn-id: https://svn.dealii.org/trunk@27797 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/matrix_free/fe_evaluation.h b/deal.II/include/deal.II/matrix_free/fe_evaluation.h index 6a44cc8b47..573dd3ea32 100644 --- a/deal.II/include/deal.II/matrix_free/fe_evaluation.h +++ b/deal.II/include/deal.II/matrix_free/fe_evaluation.h @@ -2203,7 +2203,7 @@ FEEvaluationBase Number *local_data [n_components]; for (unsigned int comp=0; comp(reinterpret_cast(values_dofs[comp])); + const_cast(&values_dofs[comp][0][0]); // standard case where there are sufficiently // many cells to fill all vectors @@ -2367,7 +2367,7 @@ FEEvaluationBase const unsigned int n_local_dofs = dofs_per_cell*VectorizedArray::n_array_elements * n_components; Number *local_data = - const_cast(reinterpret_cast(values_dofs[0])); + const_cast(&values_dofs[0][0][0]); if (at_irregular_cell == false) { // check whether there is any constraint on @@ -2841,7 +2841,7 @@ FEEvaluationBase internal::check_vector_compatibility (*src[comp], dof_info); Number *local_src_number [n_components]; for (unsigned int comp=0; comp(values_dofs[comp]); + local_src_number[comp] = &values_dofs[comp][0][0]; // standard case where there are sufficiently // many cells to fill all vectors @@ -2892,7 +2892,7 @@ FEEvaluationBase Assert (n_fe_components == n_components_, ExcNotImplemented()); const unsigned int n_local_dofs = dofs_per_cell * VectorizedArray::n_array_elements * n_components; - Number *local_src_number = reinterpret_cast(values_dofs[0]); + Number *local_src_number = &values_dofs[0][0][0]; if (at_irregular_cell == false) { for (unsigned int j=0; j