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:
@@ -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) )
|
||||||
|
Reference in New Issue
Block a user