Add bracket guards around ifs

This commit is contained in:
Pavel Krajcevski 2014-10-31 17:38:04 -04:00
parent 502c15ee29
commit e4919e75e6

View file

@ -209,29 +209,33 @@ FasTC::Image<> *ImageLoader::LoadImage() {
for(uint32 i = 0; i < aw; i++) { for(uint32 i = 0; i < aw; i++) {
unsigned int redVal = GetChannelForPixel(i, j, 0); unsigned int redVal = GetChannelForPixel(i, j, 0);
if(redVal == INT_MAX) if(redVal == INT_MAX) {
return NULL; return NULL;
}
unsigned int greenVal = redVal; unsigned int greenVal = redVal;
unsigned int blueVal = redVal; unsigned int blueVal = redVal;
if(GetGreenChannelPrecision() > 0) { if(GetGreenChannelPrecision() > 0) {
greenVal = GetChannelForPixel(i, j, 1); greenVal = GetChannelForPixel(i, j, 1);
if(greenVal == INT_MAX) if(greenVal == INT_MAX) {
return NULL; return NULL;
}
} }
if(GetBlueChannelPrecision() > 0) { if(GetBlueChannelPrecision() > 0) {
blueVal = GetChannelForPixel(i, j, 2); blueVal = GetChannelForPixel(i, j, 2);
if(blueVal == INT_MAX) if(blueVal == INT_MAX) {
return NULL; return NULL;
}
} }
unsigned int alphaVal = 0xFF; unsigned int alphaVal = 0xFF;
if(GetAlphaChannelPrecision() > 0) { if(GetAlphaChannelPrecision() > 0) {
alphaVal = GetChannelForPixel(i, j, 3); alphaVal = GetChannelForPixel(i, j, 3);
if(alphaVal == INT_MAX) if(alphaVal == INT_MAX) {
return NULL; return NULL;
}
} }
// Red channel // Red channel