mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 02:53:33 +08:00
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:
committed by
Julian Kent
parent
0fd99c59f1
commit
7a3009f7a3
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user