Checks if a pixel has valid coordinates * * @param x X coordinate * @param y Y coordinate * @param width Width of the image * @param height Height of the image * @param border_size Border size * * @return True if pixel is valid else false */
| 52 | * @return True if pixel is valid else false |
| 53 | */ |
| 54 | inline bool is_valid_pixel_index(int x, int y, int width, int height, int border_size) |
| 55 | { |
| 56 | return ((x >= -border_size) && (y >= -border_size) && (x < (width + border_size)) && (y < height + border_size)); |
| 57 | } |
| 58 | |
| 59 | #pragma GCC diagnostic push |
| 60 | #pragma GCC diagnostic ignored "-Wstrict-overflow" |
no outgoing calls
no test coverage detected