casting an {int} to a pointer, and later retrieving the int
by another cast. It should be safe provided that pointers
are at least as big as {int}, but GCC was giving warnings on
my system, so...fixed.)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@413
7f0cb862-5218-0410-a997-
914c9d46530a
/*
* Check the window's handle. Hope this works. Looks ugly. That's for sure.
*/
- if( window->ID == ( int )(enumerator->data) ) /* XXX int/ptr conversion! */
+ if( window->ID == *( int *)(enumerator->data) )
{
enumerator->found = GL_TRUE;
enumerator->data = window;
* Uses a method very similiar for fgWindowByHandle...
*/
enumerator.found = GL_FALSE;
- enumerator.data = ( void * )windowID; /* XXX int/pointer conversion! */
+ enumerator.data = ( void * )&windowID;
fgEnumWindows( fghcbWindowByID, &enumerator );
if( enumerator.found )
return ( SFG_Window * )enumerator.data;