]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid taking references on temporaries. 15299/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 4 Jun 2023 02:46:29 +0000 (20:46 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 4 Jun 2023 02:47:08 +0000 (20:47 -0600)
examples/step-70/step-70.cc

index c3f935cb5d5d117891b5ffdc7a86feccfd2d54a9..a1f7ed2ab1b048e1914abcdd772c358fc6862e1e 100644 (file)
@@ -1479,9 +1479,9 @@ namespace Step70
         Assert(pic.begin() == particle, ExcInternalError());
         for (const auto &p : pic)
           {
-            const auto &ref_q  = p.get_reference_location();
-            const auto &real_q = p.get_location();
-            const auto &JxW    = p.get_properties()[0];
+            const Point<spacedim> ref_q  = p.get_reference_location();
+            const Point<spacedim> real_q = p.get_location();
+            const double          JxW    = p.get_properties()[0];
 
             for (unsigned int i = 0; i < fluid_fe->n_dofs_per_cell(); ++i)
               {

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.