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 authored and GitHub committed 2018-08-09 07:09:37 -07:00
commit ac82adb99c
1 file changed
+2 -2
+2 -2
View File
@@ -1588,8 +1588,8 @@ void Adafruit_GFX_Button::drawButton(boolean inverted) {
*/ */
/**************************************************************************/ /**************************************************************************/
boolean Adafruit_GFX_Button::contains(int16_t x, int16_t y) { boolean Adafruit_GFX_Button::contains(int16_t x, int16_t y) {
return ((x >= _x1) && (x < (_x1 + _w)) && return ((x >= _x1) && (x < (int16_t) (_x1 + _w)) &&
(y >= _y1) && (y < (_y1 + _h))); (y >= _y1) && (y < (int16_t) (_y1 + _h)));
} }
/**************************************************************************/ /**************************************************************************/