Skip to content

Commit ac82adb

Browse files
authored
Merge pull request #173 from veekoo/fixed_some_warnings
Added a cast to int_16 since height and width are uint_16s.
2 parents 1e6251e + 675c972 commit ac82adb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Adafruit_GFX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,8 +1588,8 @@ void Adafruit_GFX_Button::drawButton(boolean inverted) {
15881588
*/
15891589
/**************************************************************************/
15901590
boolean Adafruit_GFX_Button::contains(int16_t x, int16_t y) {
1591-
return ((x >= _x1) && (x < (_x1 + _w)) &&
1592-
(y >= _y1) && (y < (_y1 + _h)));
1591+
return ((x >= _x1) && (x < (int16_t) (_x1 + _w)) &&
1592+
(y >= _y1) && (y < (int16_t) (_y1 + _h)));
15931593
}
15941594

15951595
/**************************************************************************/

0 commit comments

Comments
 (0)