diff --git a/libraries/AP_Common/AP_Test.h b/libraries/AP_Common/AP_Test.h index 5e705d20ac..732a2416f2 100644 --- a/libraries/AP_Common/AP_Test.h +++ b/libraries/AP_Common/AP_Test.h @@ -61,8 +61,8 @@ public: private: const char *_name; ///< name of the current test bool _fail; ///< set if any ::require calls indicate the test failed - static int _passed; ///< global pass count - static int _failed; ///< global fail count + static int16_t _passed; ///< global pass count + static int16_t _failed; ///< global fail count }; /// Constructor @@ -104,8 +104,8 @@ Test::report() Serial.printf("\n%d passed %d failed\n", _passed, _failed); } -int Test::_passed = 0; -int Test::_failed = 0; +int16_t Test::_passed = 0; +int16_t Test::_failed = 0; /// Start a new test. /// diff --git a/libraries/AP_Common/AP_Vector.h b/libraries/AP_Common/AP_Vector.h index bcd081a4d3..0d60ae42a8 100644 --- a/libraries/AP_Common/AP_Vector.h +++ b/libraries/AP_Common/AP_Vector.h @@ -309,7 +309,7 @@ public: return (*this)*(1/norm()); } // sum - const sumType sum(const size_t & start=0,const int & end=-1) const { + const sumType sum(const size_t & start=0,const int16_t & end=-1) const { size_t end2; if (end==-1) end2=getSize()-1; else end2=end; @@ -317,7 +317,7 @@ public: for (size_t i=start; i<=end2; i++) _sum += (*this)(i); return _sum; } - void sumFletcher(uint8_t & CK_A, uint8_t & CK_B, const size_t & start=0,const int & end=-1) const { + void sumFletcher(uint8_t & CK_A, uint8_t & CK_B, const size_t & start=0,const int16_t & end=-1) const { size_t end2; if (end==-1) end2=getSize()-1; else end2=end;