Converted a few "x != NULL" tests to "x" for clarity.
I think that I've touched enough lines of source for one morning. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@253 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
e4937ca1da
commit
6096e031d5
@ -861,15 +861,15 @@ void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int subMenuID
|
|||||||
SFG_MenuEntry* menuEntry = NULL;
|
SFG_MenuEntry* menuEntry = NULL;
|
||||||
|
|
||||||
freeglut_assert_ready;
|
freeglut_assert_ready;
|
||||||
freeglut_return_if_fail( fgStructure.Menu != NULL );
|
freeglut_return_if_fail( fgStructure.Menu );
|
||||||
freeglut_return_if_fail( subMenu != NULL );
|
freeglut_return_if_fail( subMenu );
|
||||||
menuEntry = fghFindMenuEntry( fgStructure.Menu, item );
|
menuEntry = fghFindMenuEntry( fgStructure.Menu, item );
|
||||||
freeglut_return_if_fail( menuEntry != NULL );
|
freeglut_return_if_fail( menuEntry );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We want it to become a sub menu entry, so:
|
* We want it to become a sub menu entry, so:
|
||||||
*/
|
*/
|
||||||
if( menuEntry->Text != NULL )
|
if( menuEntry->Text )
|
||||||
free( menuEntry->Text );
|
free( menuEntry->Text );
|
||||||
|
|
||||||
menuEntry->Text = strdup( label );
|
menuEntry->Text = strdup( label );
|
||||||
@ -889,7 +889,7 @@ void FGAPIENTRY glutRemoveMenuItem( int item )
|
|||||||
freeglut_assert_ready;
|
freeglut_assert_ready;
|
||||||
freeglut_return_if_fail( fgStructure.Menu );
|
freeglut_return_if_fail( fgStructure.Menu );
|
||||||
menuEntry = fghFindMenuEntry( fgStructure.Menu, item );
|
menuEntry = fghFindMenuEntry( fgStructure.Menu, item );
|
||||||
freeglut_return_if_fail( menuEntry != NULL );
|
freeglut_return_if_fail( menuEntry );
|
||||||
fgListRemove( &fgStructure.Menu->Entries, &menuEntry->Node );
|
fgListRemove( &fgStructure.Menu->Entries, &menuEntry->Node );
|
||||||
free( menuEntry->Text );
|
free( menuEntry->Text );
|
||||||
free( menuEntry );
|
free( menuEntry );
|
||||||
|
Reference in New Issue
Block a user