Several test-on-assignment cases have been converted to stop GCC from

complaining about  if( a = get_a_value_for_a( ) ) type code.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@412 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
rkrolib 2003-12-22 21:39:18 +00:00
parent 0687f2f596
commit 69c32f5e17
2 changed files with 23 additions and 29 deletions

View File

@ -303,10 +303,11 @@ static void fghCheckJoystickPolls( void )
static void fghCheckTimers( void )
{
long checkTime = fgElapsedTime( );
SFG_Timer *timer;
while( timer = fgState.Timers.First )
while( fgState.Timers.First )
{
SFG_Timer *timer = fgState.Timers.First;
if( timer->TriggerTime > checkTime )
break;

View File

@ -210,10 +210,9 @@ void fgAddToWindowDestroyList( SFG_Window* window )
*/
void fgCloseWindows( )
{
SFG_WindowList *window_ptr;
while( window_ptr = fgStructure.WindowsToDestroy.First )
while( fgStructure.WindowsToDestroy.First )
{
SFG_WindowList *window_ptr = fgStructure.WindowsToDestroy.First;
fgDestroyWindow( window_ptr->window );
fgListRemove( &fgStructure.WindowsToDestroy, &window_ptr->node );
free( window_ptr );
@ -227,14 +226,13 @@ void fgCloseWindows( )
*/
void fgDestroyWindow( SFG_Window* window )
{
SFG_Window* subWindow;
int menu_index;
assert( window );
freeglut_assert_ready;
while( subWindow = ( SFG_Window * )window->Children.First )
fgDestroyWindow( subWindow );
while( window->Children.First )
fgDestroyWindow( ( SFG_Window * )window->Children.First );
{
SFG_Window *activeWindow = fgStructure.Window;
@ -251,10 +249,8 @@ void fgDestroyWindow( SFG_Window* window )
fgDeactivateMenu( window );
for( menu_index = 0; menu_index < 3; menu_index ++ )
{
if( window->Menu[ menu_index ] )
window->Menu[ menu_index ]->ParentWindow = NULL;
}
fgClearCallBacks( window );
fgCloseWindow( window );
@ -397,9 +393,6 @@ void fgCreateStructure( void )
*/
void fgDestroyStructure( void )
{
SFG_Window *window;
SFG_Menu *menu;
freeglut_assert_ready;
/*
@ -410,11 +403,11 @@ void fgDestroyStructure( void )
/*
* Make sure all windows and menus have been deallocated
*/
while( menu = ( SFG_Menu * )fgStructure.Menus.First )
fgDestroyMenu( menu );
while( fgStructure.Menus.First )
fgDestroyMenu( ( SFG_Menu * )fgStructure.Menus.First );
while( window = ( SFG_Window * )fgStructure.Windows.First )
fgDestroyWindow( window );
while( fgStructure.Windows.First )
fgDestroyWindow( ( SFG_Window * )fgStructure.Windows.First );
}
/*