Stylistic change only (added "do { ... } while( 0 )" around multi-statement macros)
authorSven Panne <sven.panne@aedion.de>
Sun, 23 Jan 2005 17:52:16 +0000 (17:52 +0000)
committerSven Panne <sven.panne@aedion.de>
Sun, 23 Jan 2005 17:52:16 +0000 (17:52 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@564 7f0cb862-5218-0410-a997-914c9d46530a

src/freeglut_callbacks.c
src/freeglut_internal.h

index 9e5e5c6..f1f4b90 100644 (file)
 /*
  * 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
index a6a4a76..4004590 100644 (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: