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=bda6a0848d0815a0f513b3684b491cb5c16fdc52;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); }