Adjusted some spacing in a few spots to be more consistant with
freeglut style. Including one unindented if() body.
Eliminated a dead variable.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@437
7f0cb862-5218-0410-a997-
914c9d46530a
break;
}
- if ( GetSystemMetrics( SM_SWAPBUTTON ) )
+ if( GetSystemMetrics( SM_SWAPBUTTON ) )
{
- if ( button == GLUT_LEFT_BUTTON )
+ if( button == GLUT_LEFT_BUTTON )
button = GLUT_RIGHT_BUTTON;
else
- if ( button == GLUT_RIGHT_BUTTON )
- button = GLUT_LEFT_BUTTON;
+ if( button == GLUT_RIGHT_BUTTON )
+ button = GLUT_LEFT_BUTTON;
}
if( button == -1 )
/*
* Have the label drawn, character after character:
*/
- glutBitmapString( FREEGLUT_MENU_FONT, (unsigned char *) menuEntry->Text);
+ glutBitmapString( FREEGLUT_MENU_FONT,
+ (unsigned char *)menuEntry->Text);
/*
* If it's a submenu, draw a right arrow
/*
* Update the menu entry's width value
*/
- menuEntry->Width = glutBitmapLength( FREEGLUT_MENU_FONT,
- (unsigned char *) menuEntry->Text );
+ menuEntry->Width = glutBitmapLength(
+ FREEGLUT_MENU_FONT,
+ (unsigned char *)menuEntry->Text
+ );
/*
* If the entry is a submenu, then it needs to be wider to
* accomodate the arrow. JCJ 31 July 2003
*/
if (menuEntry->SubMenu )
- menuEntry->Width += glutBitmapLength( FREEGLUT_MENU_FONT, (unsigned char *) "_" );
+ menuEntry->Width += glutBitmapLength(
+ FREEGLUT_MENU_FONT,
+ (unsigned char *)"_"
+ );
/*
* Check if it's the biggest we've found
void fgListRemove(SFG_List *list, SFG_Node *node)
{
- SFG_Node *ln;
-
- if( (ln = (SFG_Node *)node->Next) != NULL )
- ln->Prev = node->Prev;
- if( (ln = (SFG_Node *)node->Prev) != NULL )
- ln->Next = node->Next;
- if( (ln = (SFG_Node *)list->First) == node )
+ if( node->Next )
+ ( ( SFG_Node * )node->Next )->Prev = node->Prev;
+ if( node->Prev )
+ ( ( SFG_Node * )node->Prev )->Next = node->Next;
+ if( ( ( SFG_Node * )list->First ) == node )
list->First = node->Next;
- if( (ln = (SFG_Node *)list->Last) == node )
+ if( ( ( SFG_Node * )list->Last ) == node )
list->Last = node->Prev;
}