]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Avoid warnings about comparison of signed and unsigned integers. 119/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 10 Mar 2023 19:25:27 +0000 (12:25 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 10 Mar 2023 19:25:27 +0000 (12:25 -0700)
Maxwell-Eigenvalue-hp-Refinement/maxwell-hp.cc

index 338f39bd8cf1a44f4738a112754fed4b5077a3ef..2e8b687cf94bef00013469c01973279210a4e638 100644 (file)
@@ -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<unsigned int>(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<unsigned int>(cell->active_fe_index() + 1) <
                         ErrorIndicator::get_FECollection()->size())
                       cell->set_active_fe_index(cell->active_fe_index() + 1);
                   }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.