From 545882c858f06224354c5d2c55dbd8befdfb13b6 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 6 Jun 2023 08:34:41 -0600 Subject: [PATCH] Minor updates to step-62. --- examples/step-62/step-62.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/step-62/step-62.cc b/examples/step-62/step-62.cc index 3d31085566..eef3c54135 100644 --- a/examples/step-62/step-62.cc +++ b/examples/step-62/step-62.cc @@ -1386,9 +1386,7 @@ int main(int argc, char *argv[]) // Each of the simulations (displacement and calibration) is stored in a // separate HDF5 group: - const std::vector group_names = {"displacement", - "calibration"}; - for (auto group_name : group_names) + for (const std::string &group_name : {"displacement", "calibration"}) { // For each of these two group names, we now create the group and put // attributes into these groups. @@ -1420,7 +1418,7 @@ int main(int argc, char *argv[]) group.set_attribute("youngs_modulus", 270000000000.0); group.set_attribute("material_a_rho", 3200); - if (group_name == std::string("displacement")) + if (group_name == "displacement") group.set_attribute("material_b_rho", 2000); else group.set_attribute("material_b_rho", 3200); -- 2.39.5