]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix two signed/unsigned comparisons. 12209/head
authorSimon Sticko <simon@sticko.se>
Sat, 15 May 2021 08:47:21 +0000 (10:47 +0200)
committerSimon Sticko <simon@sticko.se>
Sat, 15 May 2021 08:47:21 +0000 (10:47 +0200)
source/base/function_restriction.cc

index e927f2298403ba14fde2d85e611a8c4ec3f9d8a2..bfdfff8154f63e5bbc4968428aadad61cca27644 100644 (file)
@@ -119,11 +119,11 @@ namespace Functions
     // the derivatives with respect to this direction and copy the other
     // values.
     SymmetricTensor<2, dim> hess;
-    for (unsigned int i = 0; i < dim; ++i)
+    for (int i = 0; i < dim; ++i)
       {
         const unsigned int i_to_write_from =
           internal::coordinate_to_one_dim_higher<dim>(restricted_direction, i);
-        for (unsigned int j = 0; j < dim; ++j)
+        for (int j = 0; j < dim; ++j)
           {
             const unsigned int j_to_write_from =
               internal::coordinate_to_one_dim_higher<dim>(restricted_direction,

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.