size_t subsetBytesPerRow, subsetHeight, subsetWidth, subsetHeight;
方法调用:
(new GreyscaleLuminanceSource(subsetData, subsetBytesPerRow, subsetHeight,
0, 0, subsetWidth, subsetHeight));
方法声明:
GreyscaleLuminanceSource(unsigned char* greyData, int dataWidth, int dataHeight,
int left, int top, int width, int height);
获取此警告 'size_t' (aka 'unsigned long') to 'int'
。如何解决这个问题?
答案 0 :(得分:1)
只需将类型声明更改为int:
int subsetBytesPerRow, subsetHeight, subsetWidth, subsetHeight;
如果这只是为另一组警告换了一组警告,您可以将类型更改回size_t
,然后在调用int
时将每个参数投放到GreyscaleLuminanceSource