From: Laura Prieto Saavedra Date: Mon, 12 Aug 2024 21:12:35 +0000 (-0400) Subject: Remove void casts in FESystem source file X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17493%2Fhead;p=dealii.git Remove void casts in FESystem source file --- diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index 7fc17ff60d..8a4bcc7aca 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -187,18 +187,16 @@ namespace internal template void copy_nonprimitive_base_element_values( - const FESystem &fe, - const unsigned int base_no, - const unsigned int n_q_points, - const UpdateFlags base_flags, + [[maybe_unused]] const FESystem &fe, + [[maybe_unused]] const unsigned int base_no, + const unsigned int n_q_points, + const UpdateFlags base_flags, const std::vector::BaseOffsets> &offsets, const FEValuesImplementation::FiniteElementRelatedData &base_data, FEValuesImplementation::FiniteElementRelatedData &output_data) { - (void)fe; - (void)base_no; Assert(!fe.base_element(base_no).is_primitive(), ExcInternalError()); for (const auto &offset : offsets) @@ -1702,8 +1700,9 @@ FESystem::initialize( Assert(count_nonzeros(multiplicities) > 0, ExcMessage("You only passed FiniteElements with multiplicity 0.")); - const ReferenceCell reference_cell = fes.front()->reference_cell(); - (void)reference_cell; + [[maybe_unused]] const ReferenceCell reference_cell = + fes.front()->reference_cell(); + Assert(std::all_of(fes.begin(), fes.end(), [reference_cell](const FiniteElement *fe) {