From: Wolfgang Bangerth Date: Fri, 10 Mar 2023 19:25:27 +0000 (-0700) Subject: Avoid warnings about comparison of signed and unsigned integers. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F119%2Fhead;p=code-gallery.git Avoid warnings about comparison of signed and unsigned integers. --- diff --git a/Maxwell-Eigenvalue-hp-Refinement/maxwell-hp.cc b/Maxwell-Eigenvalue-hp-Refinement/maxwell-hp.cc index 338f39b..2e8b687 100644 --- a/Maxwell-Eigenvalue-hp-Refinement/maxwell-hp.cc +++ b/Maxwell-Eigenvalue-hp-Refinement/maxwell-hp.cc @@ -2155,7 +2155,7 @@ namespace Refinement if (cell->refine_flag_set() && smoothness_indicators[cell->active_cell_index()] > threshold_smoothness && - cell->active_fe_index() + 1 < + static_cast(cell->active_fe_index() + 1) < ErrorIndicator::get_FECollection()->size()) { cell->clear_refine_flag(); @@ -2174,7 +2174,7 @@ namespace Refinement else if (cell->refine_flag_set() && cell->diameter() < 5.0e-6) { cell->clear_refine_flag(); - if (cell->active_fe_index() + 1 < + if (static_cast(cell->active_fe_index() + 1) < ErrorIndicator::get_FECollection()->size()) cell->set_active_fe_index(cell->active_fe_index() + 1); }