AP_Math: fixed warnings on bounds checking in quaternion

This commit is contained in:
Andrew Tridgell 2015-01-09 11:04:50 +11:00
parent 3d46680348
commit fefdc37a4d
1 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ public:
float & operator[](uint8_t i) {
float *_v = &q1;
#if MATH_CHECK_INDEXES
assert(i >= 0 && i < 4);
assert(i < 4);
#endif
return _v[i];
}
@ -99,7 +99,7 @@ public:
const float & operator[](uint8_t i) const {
const float *_v = &q1;
#if MATH_CHECK_INDEXES
assert(i >= 0 && i < 4);
assert(i < 4);
#endif
return _v[i];
}