X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_structure.c;h=4a2fa06729fc781dd476a0883435d98540846fdb;hb=637007796c646a946fefba4c5e7f9d74c52e5cad;hp=353bb038f9e5aae701e35f4274f0fd4cf7a7ab4c;hpb=453e9bfabcaa1885f602129d9f775e23b6ef9cd3;p=freeglut diff --git a/src/freeglut_structure.c b/src/freeglut_structure.c index 353bb03..4a2fa06 100644 --- a/src/freeglut_structure.c +++ b/src/freeglut_structure.c @@ -29,8 +29,6 @@ #include "config.h" #endif -#define G_LOG_DOMAIN "freeglut-structure" - #include "../include/GL/freeglut.h" #include "freeglut_internal.h" @@ -561,7 +559,7 @@ static void fghcbWindowByID( SFG_Window *window, SFG_Enumerator *enumerator ) /* * Check the window's handle. Hope this works. Looks ugly. That's for sure. */ - if( window->ID == (int) (enumerator->data) ) + if( window->ID == (int) (enumerator->data) ) /* XXX int/ptr conversion! */ { enumerator->found = TRUE; enumerator->data = window; @@ -588,7 +586,7 @@ SFG_Window* fgWindowByID( int windowID ) * Uses a method very similiar for fgWindowByHandle... */ enumerator.found = FALSE; - enumerator.data = (void *) windowID; + enumerator.data = (void *) windowID; /* XXX int/pointer conversion! */ fgEnumWindows( fghcbWindowByID, &enumerator ); if( enumerator.found == TRUE ) return( SFG_Window *) enumerator.data; @@ -608,19 +606,12 @@ SFG_Menu* fgMenuByID( int menuID ) /* * It's enough to check all entries in fgStructure.Menus... */ - for( menu = (SFG_Menu *)fgStructure.Menus.First; menu; menu = (SFG_Menu *)menu->Node.Next ) - { - /* - * Does the ID number match? - */ + for( menu = (SFG_Menu *)fgStructure.Menus.First; + menu; + menu = (SFG_Menu *)menu->Node.Next ) if( menu->ID == menuID ) - return( menu ); - } - - /* - * We have not found the requested menu ID - */ - return( NULL ); + return menu; + return NULL; } /* @@ -673,7 +664,7 @@ int fgListLength(SFG_List *list) for( node = (SFG_Node *)list->First; node; node = (SFG_Node *)node->Next ) ++length; - return( length ); + return length; } /*** END OF FILE ***/