From: David Wells Date: Wed, 14 Aug 2024 22:44:37 +0000 (-0600) Subject: AffineConstraints: remove some reinterpret_casts. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17534%2Fhead;p=dealii.git AffineConstraints: remove some reinterpret_casts. --- diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index 745326e4b2..f0edc5f0da 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -4511,11 +4511,9 @@ AffineConstraints::distribute_local_to_global( // add must be equal if we have a Trilinos or PETSc vector but do not have to // be if we have a deal.II native vector: one could further optimize this for // Vector, LinearAlgebra::distributed::vector, etc. - if (std::is_same_v) + if constexpr (std::is_same_v) { - global_vector.add(vector_indices, - *reinterpret_cast *>( - &vector_values)); + global_vector.add(vector_indices, vector_values); } else {