mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-25 07:39:06 +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++) {
|
||||
|
||||
unsigned int redVal = GetChannelForPixel(i, j, 0);
|
||||
if(redVal == INT_MAX)
|
||||
if(redVal == INT_MAX) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned int greenVal = redVal;
|
||||
unsigned int blueVal = redVal;
|
||||
|
||||
if(GetGreenChannelPrecision() > 0) {
|
||||
greenVal = GetChannelForPixel(i, j, 1);
|
||||
if(greenVal == INT_MAX)
|
||||
if(greenVal == INT_MAX) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if(GetBlueChannelPrecision() > 0) {
|
||||
blueVal = GetChannelForPixel(i, j, 2);
|
||||
if(blueVal == INT_MAX)
|
||||
if(blueVal == INT_MAX) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int alphaVal = 0xFF;
|
||||
if(GetAlphaChannelPrecision() > 0) {
|
||||
alphaVal = GetChannelForPixel(i, j, 3);
|
||||
if(alphaVal == INT_MAX)
|
||||
if(alphaVal == INT_MAX) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// Red channel
|
||||
|
|
Loading…
Reference in a new issue