diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-04-02 15:24:16 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-04-02 15:24:16 +0200 |
commit | 4c958c3acba0174891a8e63fab8543e3f181f7ae (patch) | |
tree | 73c55467f1a115111a3afd1b72f9a28f5908382f /lout | |
parent | 2ad31b7aab4b9dda30cf1a914d6191eab7cebfcc (diff) |
avoid compiler warnings
Diffstat (limited to 'lout')
-rw-r--r-- | lout/misc.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lout/misc.hh b/lout/misc.hh index aa32a4f5..483c75e4 100644 --- a/lout/misc.hh +++ b/lout/misc.hh @@ -178,7 +178,7 @@ public: */ inline T get (int i) { if (BOUND_CHECKING) - assert (i >= 0 && i < this->num); + assert (i >= 0 && this->num - i > 0); return this->array[i]; } @@ -192,7 +192,7 @@ public: */ inline void set (int i, T t) { if (BOUND_CHECKING) - assert (i >= 0 && i < this->num); + assert (i >= 0 && this->num - i > 0); this->array[i] = t; } }; |