]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Step-69: fix warnings 9641/head
authorPeter Munch <peterrmuench@gmail.com>
Mon, 9 Mar 2020 06:37:09 +0000 (07:37 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Mon, 9 Mar 2020 06:37:09 +0000 (07:37 +0100)
examples/step-69/step-69.cc

index fca2a20386d98d776911df49a804ed1edb84238e..836e27c8eb832d53b0ee08cb859d07debf554d3e 100644 (file)
@@ -1547,10 +1547,10 @@ namespace Step69
       // conserved quantities. The return array consists of density $\rho$,
       // velocity $u$, pressure $p$ and local speed of sound $a$:
 
-      return {projected_U[0],
-              projected_U[1] / projected_U[0],
-              ProblemDescription<1>::pressure(projected_U),
-              ProblemDescription<1>::speed_of_sound(projected_U)};
+      return {{projected_U[0],
+               projected_U[1] / projected_U[0],
+               ProblemDescription<1>::pressure(projected_U),
+               ProblemDescription<1>::speed_of_sound(projected_U)}};
     }
 
     // At this point we also define two small functions that return the
@@ -1704,22 +1704,16 @@ namespace Step69
   // naming the corresponding components:
 
   template <>
-  const std::array<std::string, 3> ProblemDescription<1>::component_names{"rho",
-                                                                          "m",
-                                                                          "E"};
+  const std::array<std::string, 3> ProblemDescription<1>::component_names{
+    {"rho", "m", "E"}};
 
   template <>
-  const std::array<std::string, 4> ProblemDescription<2>::component_names{"rho",
-                                                                          "m_1",
-                                                                          "m_2",
-                                                                          "E"};
+  const std::array<std::string, 4> ProblemDescription<2>::component_names{
+    {"rho", "m_1", "m_2", "E"}};
 
   template <>
-  const std::array<std::string, 5> ProblemDescription<3>::component_names{"rho",
-                                                                          "m_1",
-                                                                          "m_2",
-                                                                          "m_3",
-                                                                          "E"};
+  const std::array<std::string, 5> ProblemDescription<3>::component_names{
+    {"rho", "m_1", "m_2", "m_3", "E"}};
 
   // @sect4{Initial values}
 

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.