mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 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
@@ -136,7 +136,6 @@ public:
|
||||
void uncorrelateCovariance(size_t first)
|
||||
{
|
||||
static_assert(Width <= M, "Width bigger than matrix");
|
||||
assert(first >= 0);
|
||||
assert(first + Width <= M);
|
||||
|
||||
SquareMatrix<Type, M> &self = *this;
|
||||
@@ -148,7 +147,6 @@ public:
|
||||
void uncorrelateCovarianceSetVariance(size_t first, const Vector<Type, Width> &vec)
|
||||
{
|
||||
static_assert(Width <= M, "Width bigger than matrix");
|
||||
assert(first >= 0);
|
||||
assert(first + Width <= M);
|
||||
|
||||
SquareMatrix<Type, M> &self = *this;
|
||||
@@ -168,7 +166,6 @@ public:
|
||||
void uncorrelateCovarianceSetVariance(size_t first, Type val)
|
||||
{
|
||||
static_assert(Width <= M, "Width bigger than matrix");
|
||||
assert(first >= 0);
|
||||
assert(first + Width <= M);
|
||||
|
||||
SquareMatrix<Type, M> &self = *this;
|
||||
@@ -187,7 +184,6 @@ public:
|
||||
void makeBlockSymmetric(size_t first)
|
||||
{
|
||||
static_assert(Width <= M, "Width bigger than matrix");
|
||||
assert(first >= 0);
|
||||
assert(first + Width <= M);
|
||||
|
||||
SquareMatrix<Type, M> &self = *this;
|
||||
@@ -207,7 +203,6 @@ public:
|
||||
void makeRowColSymmetric(size_t first)
|
||||
{
|
||||
static_assert(Width <= M, "Width bigger than matrix");
|
||||
assert(first >= 0);
|
||||
assert(first + Width <= M);
|
||||
|
||||
SquareMatrix<Type, M> &self = *this;
|
||||
@@ -231,7 +226,6 @@ public:
|
||||
bool isBlockSymmetric(size_t first, const Type eps = 1e-8f)
|
||||
{
|
||||
static_assert(Width <= M, "Width bigger than matrix");
|
||||
assert(first >= 0);
|
||||
assert(first + Width <= M);
|
||||
|
||||
SquareMatrix<Type, M> &self = *this;
|
||||
@@ -252,7 +246,6 @@ public:
|
||||
bool isRowColSymmetric(size_t first, const Type eps = 1e-8f)
|
||||
{
|
||||
static_assert(Width <= M, "Width bigger than matrix");
|
||||
assert(first >= 0);
|
||||
assert(first + Width <= M);
|
||||
|
||||
SquareMatrix<Type, M> &self = *this;
|
||||
|
||||
Reference in New Issue
Block a user