Fix harmless warning about unused variable in wxMSW wxMenu

A variable was unused in wxDEBUG_LEVEL==0 build and assigning to it resulted
in a warning. Fix this by not defining this variable at all, which also makes
the check more clear.
This commit is contained in:
Vadim Zeitlin
2015-10-16 17:05:37 +02:00
parent 5cfaf2f898
commit ecdc7c3442

View File

@@ -738,11 +738,13 @@ wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
// Update indices of radio groups. // Update indices of radio groups.
if ( m_radioData ) if ( m_radioData )
{ {
bool inExistingGroup = m_radioData->UpdateOnRemoveItem(pos); if ( m_radioData->UpdateOnRemoveItem(pos) )
{
wxASSERT_MSG( !inExistingGroup || item->GetKind() == wxITEM_RADIO, wxASSERT_MSG( item->GetKind() == wxITEM_RADIO,
wxT("Removing non radio button from radio group?") ); wxT("Removing non radio button from radio group?") );
} }
//else: item being removed is not in a radio group
}
// remove the item from the menu // remove the item from the menu
if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) ) if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) )