Fix warning about unused variable in release build
Refactor the code to remove variable which is used only in the assertion. See #14213.
This commit is contained in:
@@ -370,9 +370,11 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
}
|
}
|
||||||
else if ( m_radioData )
|
else if ( m_radioData )
|
||||||
{
|
{
|
||||||
bool groupWasSplit = m_radioData->UpdateOnInsertNonRadio(pos);
|
if ( m_radioData->UpdateOnInsertNonRadio(pos) )
|
||||||
wxASSERT_MSG( !groupWasSplit,
|
{
|
||||||
wxS("Inserting non-radio item inside a radio group?") );
|
// One of the exisiting groups has been split into two subgroups.
|
||||||
|
wxFAIL_MSG(wxS("Inserting non-radio item inside a radio group?"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Also handle the case of check menu items that had been checked before
|
// Also handle the case of check menu items that had been checked before
|
||||||
|
@@ -149,9 +149,11 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *item, size_t pos)
|
|||||||
}
|
}
|
||||||
else if ( m_radioData )
|
else if ( m_radioData )
|
||||||
{
|
{
|
||||||
bool groupWasSplit = m_radioData->UpdateOnInsertNonRadio(pos);
|
if ( m_radioData->UpdateOnInsertNonRadio(pos) )
|
||||||
wxASSERT_MSG( !groupWasSplit,
|
{
|
||||||
wxS("Inserting non-radio item inside a radio group?") );
|
// One of the exisiting groups has been split into two subgroups.
|
||||||
|
wxFAIL_MSG(wxS("Inserting non-radio item inside a radio group?"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we're already attached to the menubar, we must update it
|
// if we're already attached to the menubar, we must update it
|
||||||
|
Reference in New Issue
Block a user