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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -