From 5508417bc42bd2fa61c6a3ceedfff17ecee313d3 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Fri, 21 May 2021 13:34:14 -0600 Subject: [PATCH] Fix clang-tidy issues with #12246. --- source/numerics/derivative_approximation.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/numerics/derivative_approximation.cc b/source/numerics/derivative_approximation.cc index 6b03c32d3b..d7d01a75a9 100644 --- a/source/numerics/derivative_approximation.cc +++ b/source/numerics/derivative_approximation.cc @@ -801,7 +801,11 @@ namespace DerivativeApproximation solution, component); // ...and the place where it lives - const Point this_center = fe_midpoint_value.quadrature_point(0); + // This needs to be a copy. If it was a reference, it would be changed + // after the next `reinit` call of the FEValues object. clang-tidy + // complains about this not being a reference, so we suppress the warning. + const Point this_center = + fe_midpoint_value.quadrature_point(0); // NOLINT // loop over all neighbors and // accumulate the difference -- 2.39.5