]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix more findings of modernize-use-emplace 5966/head
authorTimo Heister <timo.heister@gmail.com>
Tue, 27 Feb 2018 18:01:37 +0000 (13:01 -0500)
committerTimo Heister <timo.heister@gmail.com>
Tue, 27 Feb 2018 18:01:37 +0000 (13:01 -0500)
examples/step-17/step-17.cc
examples/step-18/step-18.cc
examples/step-31/step-31.cc
examples/step-32/step-32.cc
examples/step-33/step-33.cc
examples/step-43/step-43.cc
examples/step-45/step-45.cc
examples/step-55/step-55.cc

index 6bacda5732c497c454a17356ab2471d8cccb98c9..a9e75d33776ce11d32548163d1d9e38d327faad0 100644 (file)
@@ -954,16 +954,16 @@ namespace Step17
         switch (dim)
           {
           case 1:
-            solution_names.push_back ("displacement");
+            solution_names.emplace_back ("displacement");
             break;
           case 2:
-            solution_names.push_back ("x_displacement");
-            solution_names.push_back ("y_displacement");
+            solution_names.emplace_back ("x_displacement");
+            solution_names.emplace_back ("y_displacement");
             break;
           case 3:
-            solution_names.push_back ("x_displacement");
-            solution_names.push_back ("y_displacement");
-            solution_names.push_back ("z_displacement");
+            solution_names.emplace_back ("x_displacement");
+            solution_names.emplace_back ("y_displacement");
+            solution_names.emplace_back ("z_displacement");
             break;
           default:
             Assert (false, ExcInternalError());
index 026ba3b3af1369820c2395996f286b11c471a8d6..ac33fc07b8e81275cf9bc2ef3b4c184b51f653f5 100644 (file)
@@ -1248,16 +1248,16 @@ namespace Step18
     switch (dim)
       {
       case 1:
-        solution_names.push_back ("delta_x");
+        solution_names.emplace_back ("delta_x");
         break;
       case 2:
-        solution_names.push_back ("delta_x");
-        solution_names.push_back ("delta_y");
+        solution_names.emplace_back ("delta_x");
+        solution_names.emplace_back ("delta_y");
         break;
       case 3:
-        solution_names.push_back ("delta_x");
-        solution_names.push_back ("delta_y");
-        solution_names.push_back ("delta_z");
+        solution_names.emplace_back ("delta_x");
+        solution_names.emplace_back ("delta_y");
+        solution_names.emplace_back ("delta_z");
         break;
       default:
         Assert (false, ExcNotImplemented());
index 8a5aa28a5de3286641ecb0a1eb76320cfe9f6ff0..3516584150cad582fbab2d05ceb801401e514bd5 100644 (file)
@@ -1950,7 +1950,7 @@ namespace Step31
       return;
 
     std::vector<std::string> stokes_names (dim, "velocity");
-    stokes_names.push_back ("p");
+    stokes_names.emplace_back ("p");
     std::vector<DataComponentInterpretation::DataComponentInterpretation>
     stokes_component_interpretation
     (dim+1, DataComponentInterpretation::component_is_scalar);
index 68afe56909ea30f205246c2c1e3a22f3ae745f70..b7750eda86db342fca8db8d65f8c892696d2a1e1 100644 (file)
@@ -3185,10 +3185,10 @@ namespace Step32
   BoussinesqFlowProblem<dim>::Postprocessor::get_names() const
   {
     std::vector<std::string> solution_names (dim, "velocity");
-    solution_names.push_back ("p");
-    solution_names.push_back ("T");
-    solution_names.push_back ("friction_heating");
-    solution_names.push_back ("partition");
+    solution_names.emplace_back ("p");
+    solution_names.emplace_back ("T");
+    solution_names.emplace_back ("friction_heating");
+    solution_names.emplace_back ("partition");
 
     return solution_names;
   }
index b98589bdc1f7407f8579b49e4c59571a7c6dca22..cd9e10516e0426e6db0d37b60b336268ea4a4e9b 100644 (file)
@@ -129,8 +129,8 @@ namespace Step33
     component_names ()
     {
       std::vector<std::string> names (dim, "momentum");
-      names.push_back ("density");
-      names.push_back ("energy_density");
+      names.emplace_back ("density");
+      names.emplace_back ("energy_density");
 
       return names;
     }
@@ -640,11 +640,11 @@ namespace Step33
   {
     std::vector<std::string> names;
     for (unsigned int d=0; d<dim; ++d)
-      names.push_back ("velocity");
-    names.push_back ("pressure");
+      names.emplace_back ("velocity");
+    names.emplace_back ("pressure");
 
     if (do_schlieren_plot == true)
-      names.push_back ("schlieren_plot");
+      names.emplace_back ("schlieren_plot");
 
     return names;
   }
index c2d183340c17de07ac3d471de0eb37486873373d..0ece4e1db8ba2ee7e050a42ad39532550d1f7de6 100644 (file)
@@ -1821,8 +1821,8 @@ namespace Step43
         }
     }
     std::vector<std::string> joint_solution_names (dim, "velocity");
-    joint_solution_names.push_back ("pressure");
-    joint_solution_names.push_back ("saturation");
+    joint_solution_names.emplace_back ("pressure");
+    joint_solution_names.emplace_back ("saturation");
 
     std::vector<DataComponentInterpretation::DataComponentInterpretation>
     data_component_interpretation
index 2acf15a42fe9c2acb79f22feba33ff1889b466d7..145a88389f0a70054c56ddf9de47814a2d7b4602 100644 (file)
@@ -657,7 +657,7 @@ namespace Step45
   StokesProblem<dim>::output_results (const unsigned int refinement_cycle)  const
   {
     std::vector<std::string> solution_names (dim, "velocity");
-    solution_names.push_back ("pressure");
+    solution_names.emplace_back ("pressure");
 
     std::vector<DataComponentInterpretation::DataComponentInterpretation>
     data_component_interpretation
index 4f399e5d0c6cceb2f259f989defc2309bc257678..a3959328d91d747a08d36b5f8674804d9d9c3a7a 100644 (file)
@@ -732,7 +732,7 @@ namespace Step55
 
 
     std::vector<std::string> solution_names (dim, "velocity");
-    solution_names.push_back ("pressure");
+    solution_names.emplace_back ("pressure");
     std::vector<DataComponentInterpretation::DataComponentInterpretation>
     data_component_interpretation
     (dim, DataComponentInterpretation::component_is_part_of_vector);
@@ -754,7 +754,7 @@ namespace Step55
     interpolated_relevant = interpolated;
     {
       std::vector<std::string> solution_names (dim, "ref_u");
-      solution_names.push_back ("ref_p");
+      solution_names.emplace_back ("ref_p");
       data_out.add_data_vector (interpolated_relevant, solution_names,
                                 DataOut<dim>::type_dof_data,
                                 data_component_interpretation);

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.