changeset 1033:70bac0031b1c

avoid compiler warnings
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Thu, 02 Apr 2009 15:24:16 +0200
parents f8b1844a4fc7
children 03ac3106d5ac
files lout/misc.hh
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lout/misc.hh	Sat Mar 28 16:08:04 2009 +0100
+++ b/lout/misc.hh	Thu Apr 02 15:24:16 2009 +0200
@@ -178,7 +178,7 @@
     */
    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 @@
     */
    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;
    }
 };