TpHash
TpHash copied to clipboard
colors is always kGreen
in +(uint8_t *) convertToGreyscale64Array:(UIImage *)i, colors is always kGreen, kRed and kBlue if expression is always false
What is your means?
in method +(uint8_t *) convertToGreyscale64Array:(UIImage *)i, var colors is always kGreen, and never be changed in the follow code, if (colors & kRed) {sum += (rgbPixel>>24)&255; count++;} if (colors & kGreen) {sum += (rgbPixel>>16)&255; count++;} if (colors & kBlue) {sum += (rgbPixel>>8)&255; count++;}
these expression only 'colors & kGreen' is always true, others are always false and the body will never be executed