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=refs%2Fpull%2F14406%2Fhead;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(); } }