]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use unsigned types for loop again 7475/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 27 Nov 2018 00:19:30 +0000 (01:19 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 27 Nov 2018 00:19:30 +0000 (01:19 +0100)
source/distributed/tria.cc

index 29957e56ac0f152ebf241e9912296dd95b1d5a55..fb1eb28f5971ae2d050643d94a0a635406348fef 100644 (file)
@@ -3594,13 +3594,15 @@ namespace parallel
           types::subdomain_id                                  ghost_owner = 0;
           typename dealii::internal::p4est::types<dim>::topidx ghost_tree  = 0;
 
-          for (int g_idx = 0; static_cast<unsigned int>(g_idx) <
-                              parallel_ghost->ghosts.elem_count;
+          for (unsigned int g_idx = 0;
+               g_idx < parallel_ghost->ghosts.elem_count;
                ++g_idx)
             {
-              while (g_idx >= parallel_ghost->proc_offsets[ghost_owner + 1])
+              while (g_idx >= static_cast<unsigned int>(
+                                parallel_ghost->proc_offsets[ghost_owner + 1]))
                 ++ghost_owner;
-              while (g_idx >= parallel_ghost->tree_offsets[ghost_tree + 1])
+              while (g_idx >= static_cast<unsigned int>(
+                                parallel_ghost->tree_offsets[ghost_tree + 1]))
                 ++ghost_tree;
 
               quadr = static_cast<

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.