From: Martin Kronbichler Date: Fri, 24 Mar 2023 09:41:44 +0000 (+0100) Subject: Simplify an assignment X-Git-Tag: v9.5.0-rc1~421^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e80180bd57b302f0d996e09f23bcc8c0672a684c;p=dealii.git Simplify an assignment --- diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index 750c1f28cc..506503b0c3 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -278,11 +278,9 @@ namespace internal if (constraints_in.is_inhomogeneously_constrained(index)) entry.inhomogeneity = constraints_in.get_inhomogeneity(index); - const auto constraints = constraints_in.get_constraint_entries(index); - - if (constraints) - for (const auto &i : *constraints) - entry.entries.push_back(i); + if (const auto constraints = + constraints_in.get_constraint_entries(index)) + entry.entries = *constraints; if (constrained_indices_owners[i] == my_rank) locally_relevant_constraints.push_back(entry);