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:
parent
61ddeb2e75
commit
f4eff70e98
@ -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
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user