Merge pull request #173 from veekoo/fixed_some_warnings

Added a cast to int_16 since height and width are uint_16s.
This commit is contained in:
Limor "Ladyada" Fried 2018-08-09 07:09:37 -07:00 committed by GitHub
commit ac82adb99c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1588,8 +1588,8 @@ void Adafruit_GFX_Button::drawButton(boolean inverted) {
*/
/**************************************************************************/
boolean Adafruit_GFX_Button::contains(int16_t x, int16_t y) {
return ((x >= _x1) && (x < (_x1 + _w)) &&
(y >= _y1) && (y < (_y1 + _h)));
return ((x >= _x1) && (x < (int16_t) (_x1 + _w)) &&
(y >= _y1) && (y < (int16_t) (_y1 + _h)));
}
/**************************************************************************/