Skip to content

Commit

Permalink
Cosmetic use { } to remove warning about possible ambiguous nested if…
Browse files Browse the repository at this point in the history
…/else constructs
  • Loading branch information
nicolas-cellier-aka-nice committed Nov 8, 2016
1 parent 9156946 commit 0730402
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Expand Up @@ -311,14 +311,14 @@ sqInt ioShowDisplayOnWindow(unsigned char* dispBits, sqInt width,
}
/* reverse the image bits if necessary */

if( !lsbDisplay && depth < 32 )
if( !lsbDisplay && depth < 32 ) {
if(depth == 16)
reverse_image_words((unsigned int*) dispBits, (unsigned int*) dispBits,
depth, width, &updateRect);
else
reverse_image_bytes((unsigned int*) dispBits, (unsigned int*) dispBits,
depth, width, &updateRect);

}
return 1;
}

Expand Down
3 changes: 2 additions & 1 deletion platforms/win32/plugins/MIDIPlugin/sqWin32MIDI.c
Expand Up @@ -881,7 +881,7 @@ int sqMIDIParameter(int whichParameter, int modify, int newValue) {
for(i=0;i<MAX_DEVICES;i++)
{
port = midiPorts[i];
if(port)
if(port) {
if(port->flags & MIDI_OUT_DEVICE)
{
/* reset output device */
Expand All @@ -898,6 +898,7 @@ int sqMIDIParameter(int whichParameter, int modify, int newValue) {
midiInStart((HMIDIIN) (port->handle));
port->inBufferStart = port->inBufferEnd = 0;
}
}
}
break;
case sqMIDIClockTicksPerSec:
Expand Down
12 changes: 8 additions & 4 deletions platforms/win32/vm/sqWin32Window.c
Expand Up @@ -2189,13 +2189,14 @@ sqInt ioFormPrint(sqInt bitsAddr, sqInt width, sqInt height, sqInt depth, double
targetRect.right = width;
targetRect.bottom = height;
#ifndef NO_BYTE_REVERSAL
if( depth < 32 )
if( depth < 32 ) {
if(depth == 16)
reverse_image_words((unsigned int*) bitsAddr, (unsigned int*) bitsAddr,
depth, width, &targetRect);
else
reverse_image_bytes((unsigned int*) bitsAddr, (unsigned int*) bitsAddr,
depth, width, &targetRect);
}
#endif /* NO_BYTE_REVERSAL */

if(GDI_ERROR == StretchDIBits(dc,
Expand All @@ -2214,13 +2215,14 @@ sqInt ioFormPrint(sqInt bitsAddr, sqInt width, sqInt height, sqInt depth, double

/* reverse the image bits if necessary */
#ifndef NO_BYTE_REVERSAL
if( depth < 32 )
if( depth < 32 ) {
if(depth == 16)
reverse_image_words((unsigned int*) bitsAddr, (unsigned int*) bitsAddr,
depth, width, &targetRect);
else
reverse_image_bytes((unsigned int*) bitsAddr, (unsigned int*) bitsAddr,
depth, width, &targetRect);
}
#endif /* NO_BYTE_REVERSAL */

EndPage (dc);
Expand Down Expand Up @@ -2407,13 +2409,14 @@ sqInt ioShowDisplay(sqInt dispBits, sqInt width, sqInt height, sqInt depth,
/* reverse the image bits if necessary */
#ifndef NO_BYTE_REVERSAL
PROFILE_BEGIN(PROFILE_DISPLAY)
if( !lsbDisplay && depth < 32 )
if( !lsbDisplay && depth < 32 ) {
if(depth == 16)
reverse_image_words((unsigned int*) dispBits, (unsigned int*) dispBits,
depth, width, &updateRect);
else
reverse_image_bytes((unsigned int*) dispBits, (unsigned int*) dispBits,
depth, width, &updateRect);
}
PROFILE_END(ticksForReversal)
#endif /* NO_BYTE_REVERSAL */

Expand Down Expand Up @@ -2491,13 +2494,14 @@ sqInt ioShowDisplay(sqInt dispBits, sqInt width, sqInt height, sqInt depth,
/* reverse the image bits if necessary */
#ifndef NO_BYTE_REVERSAL
PROFILE_BEGIN(PROFILE_DISPLAY)
if( !lsbDisplay && depth < 32 )
if( !lsbDisplay && depth < 32 ) {
if(depth == 16)
reverse_image_words((unsigned int*) dispBits, (unsigned int*) dispBits,
depth, width, &updateRect);
else
reverse_image_bytes((unsigned int*) dispBits, (unsigned int*) dispBits,
depth, width, &updateRect);
}
PROFILE_END(ticksForReversal)
#endif /* NO_BYTE_REVERSAL */
#endif /* defined(_WIN32_WCE) */
Expand Down

0 comments on commit 0730402

Please sign in to comment.