From: Wolfgang Bangerth Date: Wed, 28 Aug 2024 02:48:41 +0000 (-0600) Subject: Make a condition easier to read. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d592190a5b13b9760bb58504e5157dfe98594ca4;p=dealii.git Make a condition easier to read. --- diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index 2f311b9e56..2e369db41f 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -659,11 +659,11 @@ AffineConstraints::make_consistent_in_parallel( this->add_constraint(line.index, line.entries, line.inhomogeneity); // 4) Stop loop if converged. - const auto constraints_converged = - Utilities::MPI::min(static_cast( - constraints_to_make_consistent == - constraints_made_consistent), - mpi_communicator); + const bool constraints_converged = + (Utilities::MPI::min( + (constraints_to_make_consistent == constraints_made_consistent ? 1 : + 0), + mpi_communicator) == 1); if (constraints_converged) break; }