From: Wolfgang Bangerth Date: Thu, 10 Nov 2022 21:31:49 +0000 (-0700) Subject: Use a range-based for loop. X-Git-Tag: v9.5.0-rc1~858^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d345842838c13fce0df5f9045a8842a98b63477;p=dealii.git Use a range-based for loop. --- diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 7320294069..a4dd9aedda 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -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(); } }