]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use a range-based for loop. 14406/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 10 Nov 2022 21:31:49 +0000 (14:31 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 10 Nov 2022 21:32:40 +0000 (14:32 -0700)
source/base/data_out_base.cc

index 7320294069d6e61456859bcdad2195cbb208fe02..a4dd9aeddaaec8b2d230799d87737d4690cbe2fa 100644 (file)
@@ -231,8 +231,8 @@ namespace
       {
         std::ostringstream stream;
         stream.precision(precision);
-        for (unsigned int i = 0; i < data.size(); ++i)
-          stream << data[i] << ' ';
+        for (const T &el : data)
+          stream << el << ' ';
         return stream.str();
       }
   }

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.