Remove asserts for unsigned integer >= 0

GCC 10 gives a warning
"comparison of unsigned expression in ‘>= 0’ is always true"
for these asserts since checking if an unsigned integer cannot
be negative and hence the statement gets droped.
This commit is contained in:
Matthias Grob
2020-07-20 15:10:49 +02:00
committed by Julian Kent
parent 0fd99c59f1
commit 7a3009f7a3
4 changed files with 0 additions and 23 deletions
-8
View File
@@ -96,9 +96,7 @@ public:
inline const Type &operator()(size_t i, size_t j) const
{
assert(i >= 0);
assert(i < M);
assert(j >= 0);
assert(j < N);
return _data[i][j];
@@ -106,9 +104,7 @@ public:
inline Type &operator()(size_t i, size_t j)
{
assert(i >= 0);
assert(i < M);
assert(j >= 0);
assert(j < N);
return _data[i][j];
@@ -494,9 +490,7 @@ public:
inline void swapRows(size_t a, size_t b)
{
assert(a >= 0);
assert(a < M);
assert(b >= 0);
assert(b < M);
if (a == b) {
@@ -514,9 +508,7 @@ public:
inline void swapCols(size_t a, size_t b)
{
assert(a >= 0);
assert(a < N);
assert(b >= 0);
assert(b < N);
if (a == b) {