mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-31 16:09:28 +02:00
Possible fix for Linux ASSERT (debug builds) with lots of duplicate key bindings. Also fixed some unused parameter warnings.
This commit is contained in:
parent
25f2206205
commit
969122a985
@ -448,7 +448,7 @@ void CommandManager::AddCheck(const wxChar *name,
|
||||
CommandFunctor *callback,
|
||||
int checkmark)
|
||||
{
|
||||
AddItem(name, label, callback, wxT(""), NoFlagsSpecifed, NoFlagsSpecifed, checkmark);
|
||||
AddItem(name, label, callback, wxT(""), (unsigned int)NoFlagsSpecifed, (unsigned int)NoFlagsSpecifed, checkmark);
|
||||
}
|
||||
|
||||
void CommandManager::AddCheck(const wxChar *name,
|
||||
@ -698,11 +698,17 @@ int CommandManager::NewIdentifier(wxString name, wxString label, wxMenu *menu,
|
||||
#if defined(__WXDEBUG__)
|
||||
CommandListEntry *prev = mCommandNameHash[name];
|
||||
if (prev) {
|
||||
wxLogDebug(wxT("Command '%s' defined by '%s' and '%s'"),
|
||||
if( prev->label != tmpEntry->label )
|
||||
{
|
||||
wxLogDebug(wxT("Command '%s' defined by '%s' and '%s'"),
|
||||
name.c_str(),
|
||||
prev->label.BeforeFirst(wxT('\t')).c_str(),
|
||||
tmpEntry->label.BeforeFirst(wxT('\t')).c_str());
|
||||
wxFAIL_MSG( wxString::Format(wxT("Command '%s' defined by '%s' and '%s'"),
|
||||
name.c_str(),
|
||||
prev->label.BeforeFirst(wxT('\t')).c_str(),
|
||||
tmpEntry->label.BeforeFirst(wxT('\t')).c_str());
|
||||
wxASSERT(!prev);
|
||||
tmpEntry->label.BeforeFirst(wxT('\t')).c_str()));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
mCommandNameHash[name] = tmpEntry;
|
||||
@ -1245,7 +1251,7 @@ void CommandManager::HandleXMLEndTag(const wxChar *tag)
|
||||
}
|
||||
}
|
||||
|
||||
XMLTagHandler *CommandManager::HandleXMLChild(const wxChar *tag)
|
||||
XMLTagHandler *CommandManager::HandleXMLChild(const wxChar * WXUNUSED(tag))
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user