]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make some compiler warnings about signed/unsigned comparisons go away.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Mar 1999 21:39:24 +0000 (21:39 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Mar 1999 21:39:24 +0000 (21:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@1013 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/time_dependent.h

index cad94127cdf3f852252b9c536bb397276421956f..392d4ae883b908900b781a86d3c0a68eab9ef8d9 100644 (file)
@@ -546,7 +546,7 @@ void TimeDependent::do_loop (InitFunctionObject      init_function,
                    timesteps[step+look_ahead]->wake_up(look_ahead);
                  break;
            case backward:
-                 if (n_timesteps-(step+look_ahead) >= 0)
+                 if (n_timesteps >= (step+look_ahead))
                    timesteps[n_timesteps-(step+look_ahead)]->wake_up(look_ahead);
                  break;
          };
@@ -595,9 +595,9 @@ void TimeDependent::do_loop (InitFunctionObject      init_function,
                  timesteps[step-look_back]->sleep(look_back);
                break;
          case backward:
-               if ((n_timesteps-(step-look_back) < n_timesteps)
+               if ((step-look_back > 0)
                    &&
-                   (n_timesteps-(step-look_back) >= 0))
+                   ((step-look_back) <= static_cast<int>(n_timesteps)))
                  timesteps[n_timesteps-(step-look_back)]->sleep(look_back);
                break;
        };

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.