mirror of
https://github.com/adafruit/Adafruit-GFX-Library.git
synced 2026-10-26 22:10:52 +00:00
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:
1 file changed
+2
-2
+2
-2
@@ -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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|||||||
Reference in new issue
Block a user