c++ - iOS - implicit conversion loses integer precision 'size_t' (aka 'unsigned long') to 'int' -
size_t subsetbytesperrow, subsetheight, subsetwidth, subsetheight;
method calling:
(new greyscaleluminancesource(subsetdata, subsetbytesperrow, subsetheight, 0, 0, subsetwidth, subsetheight));
method declaration:
greyscaleluminancesource(unsigned char* greydata, int datawidth, int dataheight, int left, int top, int width, int height);
getting warning 'size_t' (aka 'unsigned long') 'int'
. how fix one?
just change type declarations int:
int subsetbytesperrow, subsetheight, subsetwidth, subsetheight;
in event trades off 1 set of warnings another, change type size_t
, cast each parameter int
in call greyscaleluminancesource
.
Comments
Post a Comment