Arduboy2: static constexpr bool validPixel

This commit is contained in:
Mingye Wang 2018-11-13 13:07:42 -05:00 committed by GitHub
parent ecf87428fd
commit 81fbe89193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@ class Arduboy2Base : public Arduboy2Core
* This function returns true if x is in the interval [0, WIDTH) and y is in * This function returns true if x is in the interval [0, WIDTH) and y is in
* the interval [0, HEIGHT). * the interval [0, HEIGHT).
*/ */
bool validPixel(int16_t x, int16_t y) { static constexpr bool validPixel(int16_t x, int16_t y) {
return !(x < 0 || x > (WIDTH-1) || y < 0 || y > (HEIGHT-1)); return !(x < 0 || x > (WIDTH-1) || y < 0 || y > (HEIGHT-1));
} }