@@ -191,7 +191,7 @@ object get_pixel(mapnik::image_any const& im, unsigned x, unsigned y, bool get_c
191191
192192void set_pixel_color (mapnik::image_any & im, unsigned x, unsigned y, mapnik::color const & c)
193193{
194- if (x >= static_cast <int >(im.width ()) && y >= static_cast <int >(im.height ()))
194+ if (x >= static_cast <unsigned >(im.width ()) && y >= static_cast <unsigned >(im.height ()))
195195 {
196196 PyErr_SetString (PyExc_IndexError, " invalid x,y for image dimensions" );
197197 boost::python::throw_error_already_set ();
@@ -202,7 +202,7 @@ void set_pixel_color(mapnik::image_any & im, unsigned x, unsigned y, mapnik::col
202202
203203void set_pixel_double (mapnik::image_any & im, unsigned x, unsigned y, double val)
204204{
205- if (x >= static_cast <int >(im.width ()) && y >= static_cast <int >(im.height ()))
205+ if (x >= static_cast <unsigned >(im.width ()) && y >= static_cast <unsigned >(im.height ()))
206206 {
207207 PyErr_SetString (PyExc_IndexError, " invalid x,y for image dimensions" );
208208 boost::python::throw_error_already_set ();
@@ -213,7 +213,7 @@ void set_pixel_double(mapnik::image_any & im, unsigned x, unsigned y, double val
213213
214214void set_pixel_int (mapnik::image_any & im, unsigned x, unsigned y, int val)
215215{
216- if (x >= static_cast <int >(im.width ()) && y >= static_cast <int >(im.height ()))
216+ if (x >= static_cast <unsigned >(im.width ()) && y >= static_cast <unsigned >(im.height ()))
217217 {
218218 PyErr_SetString (PyExc_IndexError, " invalid x,y for image dimensions" );
219219 boost::python::throw_error_already_set ();
0 commit comments