Browse Source

AP_Math: fixed warnings on bounds checking in quaternion

master
Andrew Tridgell 10 years ago
parent
commit
fefdc37a4d
  1. 4
      libraries/AP_Math/quaternion.h

4
libraries/AP_Math/quaternion.h

@ -91,7 +91,7 @@ public: @@ -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: @@ -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];
}

Loading…
Cancel
Save