compilation warnings fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-06-01 15:16:07 +00:00
parent 550e6c014c
commit 5be55d562f
14 changed files with 144 additions and 128 deletions

View File

@@ -363,7 +363,7 @@ void wxMenu::MacEnableMenu( bool bDoEnable )
void wxMenu::MacBeforeDisplay( bool isSubMenu )
{
wxMenuItem* previousItem = NULL ;
int pos ;
size_t pos ;
wxMenuItemList::Node *node;
wxMenuItem *item;
for (pos = 0, node = GetMenuItems().GetFirst(); node; node = node->GetNext(), pos++)
@@ -382,7 +382,9 @@ void wxMenu::MacBeforeDisplay( bool isSubMenu )
if ( item->GetId() == wxApp::s_macPreferencesMenuItemId || item->GetId() == wxApp::s_macExitMenuItemId)
{
ChangeMenuItemAttributes( MAC_WXHMENU( GetHMenu() ) , pos + 1, kMenuItemAttrHidden, 0 );
if ( GetMenuItems().GetCount() == pos + 1 && previousItem != NULL && previousItem->IsSeparator() )
if ( GetMenuItems().GetCount() == pos + 1 &&
previousItem != NULL &&
previousItem->IsSeparator() )
{
ChangeMenuItemAttributes( MAC_WXHMENU( GetHMenu() ) , pos , kMenuItemAttrHidden, 0 );
}