summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fe1aeed)
Move assignment out of while test, scope temporary inside loop
Be explicit about assignment/comparison in if test for gcc peace of mind
suppress gcc -Wall -pendantic "noise"
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@431
7f0cb862-5218-0410-a997-
914c9d46530a
* to ensure that they are no longer called after this point.
*/
{
* to ensure that they are no longer called after this point.
*/
{
- void *destroy = FETCH_WCB( *window, Destroy );
+ FGCBDestroy destroy = FETCH_WCB( *window, Destroy );
fgClearCallBacks( window );
SET_WCB( *window, Destroy, destroy );
}
fgClearCallBacks( window );
SET_WCB( *window, Destroy, destroy );
}
{
SFG_Window *window;
SFG_Menu *from;
{
SFG_Window *window;
SFG_Menu *from;
assert( menu );
freeglut_assert_ready;
assert( menu );
freeglut_assert_ready;
* Now we are pretty sure the menu is not used anywhere
* and that we can remove all of its entries
*/
* Now we are pretty sure the menu is not used anywhere
* and that we can remove all of its entries
*/
- while( entry = ( SFG_MenuEntry * )menu->Entries.First )
+ while( menu->Entries.First )
+ SFG_MenuEntry *entry = ( SFG_MenuEntry * ) menu->Entries.First;
+
fgListRemove( &menu->Entries, &entry->Node );
if( entry->Text )
fgListRemove( &menu->Entries, &entry->Node );
if( entry->Text )
entry->Text = NULL;
free( entry );
entry->Text = NULL;
free( entry );
}
if( fgStructure.Window == menu->Window )
}
if( fgStructure.Window == menu->Window )
void fgListAppend(SFG_List *list, SFG_Node *node)
{
void fgListAppend(SFG_List *list, SFG_Node *node)
{
- SFG_Node *ln;
-
- if ( ln = (SFG_Node *)list->Last )
+ SFG_Node *ln = (SFG_Node *) list->Last;
ln->Next = node;
node->Prev = ln;
}
ln->Next = node;
node->Prev = ln;
}
- if( ln = (SFG_Node *)node->Next )
+ if( (ln = (SFG_Node *)node->Next) != NULL )
- if( ln = (SFG_Node *)node->Prev )
+ if( (ln = (SFG_Node *)node->Prev) != NULL )
ln->Next = node->Next;
if( (ln = (SFG_Node *)list->First) == node )
list->First = node->Next;
ln->Next = node->Next;
if( (ln = (SFG_Node *)list->First) == node )
list->First = node->Next;