From: Nigel Stewart Date: Tue, 30 Dec 2003 01:52:07 +0000 (+0000) Subject: Tidy nested if/else to suppress gcc -Wall -pedantic noise X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=02d1360233aa5a71d0f46fda6c6956c5122fad80;p=freeglut Tidy nested if/else to suppress gcc -Wall -pedantic noise gcc suggests explicit braces to avoid ambiguous `else' git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@421 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/freeglut_main.c b/src/freeglut_main.c index 16a6674..6375448 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -1377,11 +1377,14 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, break; } - if( GetSystemMetrics( SM_SWAPBUTTON ) ) - if( button == GLUT_LEFT_BUTTON ) + if ( GetSystemMetrics( SM_SWAPBUTTON ) ) + { + if ( button == GLUT_LEFT_BUTTON ) button = GLUT_RIGHT_BUTTON; - else if( button == GLUT_RIGHT_BUTTON ) + else + if ( button == GLUT_RIGHT_BUTTON ) button = GLUT_LEFT_BUTTON; + } if( button == -1 ) return DefWindowProc( hWnd, uMsg, lParam, wParam );