X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_structure.c;h=8708d2bf8def8bfcc6d41fec83f89821bbd17efe;hb=ef6d30a645edad1c28b821ca7e6c6796f555ce23;hp=bc88a50376493421466cfa883b5230573df5ed81;hpb=5d724da03c1b5988304888c17c5eba8a40c0a529;p=freeglut diff --git a/src/freeglut_structure.c b/src/freeglut_structure.c index bc88a50..8708d2b 100644 --- a/src/freeglut_structure.c +++ b/src/freeglut_structure.c @@ -266,11 +266,14 @@ void fgDestroyWindow( SFG_Window* window, GLboolean needToClose ) while ( (subWindow = (SFG_Window *)window->Children.First) != NULL ) fgDestroyWindow( subWindow, needToClose ); + /* + * XXX Since INVOKE_WCB() tests the function pointer, why not make + * XXX this unconditional? Overhead is close to nil, and it would + * XXX clarify the code by omitting a conditional test. + */ if ( FETCH_WCB( *window, Destroy ) ) { SFG_Window *activeWindow = fgStructure.Window ; - /* fgSetWindow ( window ) ; */ - /* window->Callbacks.Destroy () ; */ INVOKE_WCB( *window, Destroy, ( ) ); fgSetWindow ( activeWindow ) ; }