]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid a warning about comparison of differently sized integers. 13453/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 26 Feb 2022 03:28:51 +0000 (20:28 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 26 Feb 2022 03:28:51 +0000 (20:28 -0700)
source/distributed/tria.cc

index 80ee4022e03d45598e315c8dfc032cbdc17b7dbd..1bbe85e1909b67e6c02388abaa5c1e3a9f16777a 100644 (file)
@@ -1514,7 +1514,7 @@ namespace
     const unsigned int weight = *this_object->current_pointer;
     ++this_object->current_pointer;
 
-    Assert(weight < std::numeric_limits<int>::max(),
+    Assert(weight < static_cast<unsigned int>(std::numeric_limits<int>::max()),
            ExcMessage("p4est uses 'signed int' to represent the partition "
                       "weights for cells. The weight provided here exceeds "
                       "the maximum value represented as a 'signed int'."));

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.