From 4317b239af409a23f878eea24e035f71e0a80f5b Mon Sep 17 00:00:00 2001 From: David Wells Date: Wed, 14 Aug 2024 16:44:37 -0600 Subject: [PATCH] AffineConstraints: remove some reinterpret_casts. --- include/deal.II/lac/affine_constraints.templates.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 { -- 2.39.5