From: Jean-Paul Pelteret Date: Thu, 22 Oct 2020 20:27:34 +0000 (+0200) Subject: Use non-reference type for copied RBL element X-Git-Tag: v9.3.0-rc1~981^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11088%2Fhead;p=dealii.git Use non-reference type for copied RBL element --- diff --git a/include/deal.II/base/patterns.h b/include/deal.II/base/patterns.h index a68a374a9d..e545a556c0 100644 --- a/include/deal.II/base/patterns.h +++ b/include/deal.II/base/patterns.h @@ -1792,9 +1792,10 @@ namespace Patterns auto base_p = p->get_base_pattern().clone(); std::vector vec(t.size()); - unsigned int i = 0; - for (const auto &entry : t) - vec[i++] = Convert::to_string(entry, base_p); + std::transform( + t.cbegin(), t.cend(), vec.begin(), [&base_p](const auto &entry) { + return Convert::to_string(entry, base_p); + }); std::string s; if (vec.size() > 0)