mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-25 09:49:10 +00:00
Add bracket guards around ifs
This commit is contained in:
parent
502c15ee29
commit
e4919e75e6
1 changed files with 8 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue