diff --git a/src/base/statistics.hh b/src/base/statistics.hh index 8f665fe0e8..ee541fbc88 100644 --- a/src/base/statistics.hh +++ b/src/base/statistics.hh @@ -1161,7 +1161,7 @@ class VectorBase : public DataWrapVec Proxy operator[](off_type index) { - assert (index >= 0 && index < size()); + assert (index < size()); return Proxy(this->self(), index); } }; @@ -1235,7 +1235,7 @@ class VectorProxy ScalarProxy operator[](off_type index) { - assert (index >= 0 && index < size()); + assert (index < size()); return ScalarProxy(stat, offset + index); } @@ -1311,7 +1311,7 @@ class Vector2dBase : public DataWrapVec2d operator[](off_type index) { off_type offset = index * y; - assert (index >= 0 && offset + y <= size()); + assert (offset + y <= size()); return Proxy(this->self(), offset, y); } @@ -1995,7 +1995,7 @@ class VectorDistBase : public DataWrapVec Proxy operator[](off_type index) { - assert(index >= 0 && index < size()); + assert(index < size()); return Proxy(this->self(), index); }