1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-01 16:39:30 +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:
james.k.crook@gmail.com 2013-08-25 12:54:24 +00:00
parent 25f2206205
commit 969122a985

View File

@ -448,7 +448,7 @@ void CommandManager::AddCheck(const wxChar *name,
CommandFunctor *callback, CommandFunctor *callback,
int checkmark) 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, void CommandManager::AddCheck(const wxChar *name,
@ -698,11 +698,17 @@ int CommandManager::NewIdentifier(wxString name, wxString label, wxMenu *menu,
#if defined(__WXDEBUG__) #if defined(__WXDEBUG__)
CommandListEntry *prev = mCommandNameHash[name]; CommandListEntry *prev = mCommandNameHash[name];
if (prev) { 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(), name.c_str(),
prev->label.BeforeFirst(wxT('\t')).c_str(), prev->label.BeforeFirst(wxT('\t')).c_str(),
tmpEntry->label.BeforeFirst(wxT('\t')).c_str()); tmpEntry->label.BeforeFirst(wxT('\t')).c_str()));
wxASSERT(!prev); }
} }
#endif #endif
mCommandNameHash[name] = tmpEntry; 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; return this;
} }