]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix clang-tidy issues with #12246. 12276/head
authorMarc Fehling <mafehling.git@gmail.com>
Fri, 21 May 2021 19:34:14 +0000 (13:34 -0600)
committerMarc Fehling <mafehling.git@gmail.com>
Fri, 21 May 2021 19:34:14 +0000 (13:34 -0600)
source/numerics/derivative_approximation.cc

index 6b03c32d3bb4b8b57e7199c31f27febdcf68a5b0..d7d01a75a92c523081a6f8aa4a64e53f0184dc76 100644 (file)
@@ -801,7 +801,11 @@ namespace DerivativeApproximation
                                                           solution,
                                                           component);
       // ...and the place where it lives
-      const Point<dim> 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<dim> this_center =
+        fe_midpoint_value.quadrature_point(0); // NOLINT
 
       // loop over all neighbors and
       // accumulate the difference

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.