if ( current[0U] == 'f' && wxIsdigit(current[1U]) &&
(current.Len() == 2 ||
(current.Len() == 3 && wxIsdigit(current[2U]))) ) {
- int n;
- wxSscanf(current.c_str() + 1, wxT("%d"), &n);
-
- keyCode = WXK_F1 + n - 1;
+ keyCode = WXK_F1 + wxAtoi(current.c_str() + 1) - 1;
}
else {
// several special cases
{
wxLogDebug(wxT("Unrecognized accel key '%s', accel string ignored."),
current.c_str());
+ return NULL;
}
}
}
// we should process them here
default:
- if ( wxIsalnum((wxChar)code) )
+ if ( wxIsalnum(code) )
{
text << (wxChar)code;
{
wxMenuItem *item = FindItem(id);
- wxCHECK_MSG( item, wxT(""), wxT("wxMenu::GetLabel: no such item") );
+ wxCHECK_MSG( item, wxEmptyString, wxT("wxMenu::GetLabel: no such item") );
return item->GetText();
}
{
wxMenuItem *item = FindItem(id);
- wxCHECK_MSG( item, wxT(""), wxT("wxMenu::GetHelpString: no such item") );
+ wxCHECK_MSG( item, wxEmptyString, wxT("wxMenu::GetHelpString: no such item") );
return item->GetHelp();
}