mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-26 16:16:46 +00:00
sw_engine: fix comparison of integer expressions of different signedness
Some gcc versions and configurations was giving an error: error: "comparison of integer expressions of different signedness: 'const SwCoord' {aka 'const long int'} and 'uint32_t' {aka 'unsigned int'} [-Werror=sign-compare]" This patch should fix the error
This commit is contained in:
parent
a0895cc91b
commit
9212c0d158
1 changed files with 1 additions and 1 deletions
|
@ -1539,7 +1539,7 @@ bool rasterStroke(SwSurface* surface, SwShape* shape, uint8_t r, uint8_t g, uint
|
||||||
bool rasterImage(SwSurface* surface, SwImage* image, const Matrix* transform, const SwBBox& bbox, uint32_t opacity)
|
bool rasterImage(SwSurface* surface, SwImage* image, const Matrix* transform, const SwBBox& bbox, uint32_t opacity)
|
||||||
{
|
{
|
||||||
//Verify Boundary
|
//Verify Boundary
|
||||||
if (bbox.max.x < 0 || bbox.max.y < 0 || bbox.min.x >= surface->w || bbox.min.y >= surface->h) return false;
|
if (bbox.max.x < 0 || bbox.max.y < 0 || bbox.min.x >= static_cast<SwCoord>(surface->w) || bbox.min.y >= static_cast<SwCoord>(surface->h)) return false;
|
||||||
|
|
||||||
//TOOD: switch (image->format)
|
//TOOD: switch (image->format)
|
||||||
//TODO: case: _rasterRGBImage()
|
//TODO: case: _rasterRGBImage()
|
||||||
|
|
Loading…
Add table
Reference in a new issue