Stylistic change only (added "do { ... } while( 0 )" around multi-statement macros)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@564 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
spanne 2005-01-23 17:52:16 +00:00
parent 61ddeb2e75
commit f4eff70e98
2 changed files with 8 additions and 5 deletions

View File

@ -33,10 +33,13 @@
/*
* All of the callbacks setting methods can be generalized to this:
*/
#define SET_CALLBACK(a) \
if( fgStructure.Window == NULL ) \
return; \
SET_WCB( ( *( fgStructure.Window ) ), a, callback );
#define SET_CALLBACK(a) \
do \
{ \
if( fgStructure.Window == NULL ) \
return; \
SET_WCB( ( *( fgStructure.Window ) ), a, callback ); \
} while( 0 )
/*
* Sets the Display callback for the current window

View File

@ -381,7 +381,7 @@ do \
{ \
if( FETCH_WCB( window, cbname ) != func ) \
(((window).CallBacks[CB_ ## cbname]) = (void *) func); \
} while( 0 ) \
} while( 0 )
/*
* FETCH_WCB() is used as: