]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use explicit casts.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 24 Dec 2023 03:55:21 +0000 (20:55 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 27 Dec 2023 22:41:45 +0000 (15:41 -0700)
source/grid/tria_description.cc

index 18063ac7f5f95c21019dac7b795e618f472cbf52..e5af3fad6624fee55f7c564616b36a93fb5de879 100644 (file)
@@ -1069,7 +1069,8 @@ namespace TriangulationDescription
       const auto subdomain_id_function =
         [&partition](const auto &cell) -> unsigned int {
         if ((cell->is_active() && (cell->is_artificial() == false)))
-          return partition[cell->global_active_cell_index()];
+          return static_cast<unsigned int>(
+            partition[cell->global_active_cell_index()]);
         else
           return numbers::artificial_subdomain_id;
       };
@@ -1078,7 +1079,8 @@ namespace TriangulationDescription
         [&construct_multigrid,
          &partitions_mg](const auto &cell) -> unsigned int {
         if (construct_multigrid && (cell->is_artificial_on_level() == false))
-          return partitions_mg[cell->level()][cell->global_level_cell_index()];
+          return static_cast<unsigned int>(
+            partitions_mg[cell->level()][cell->global_level_cell_index()]);
         else
           return numbers::artificial_subdomain_id;
       };

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.