Don't test for key code being valid unnecessarily.

The key code was already found to be valid just above, so suppress Coverity
warning about an always true test by not checking it again. This also makes
the code more clear.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2012-12-08 00:37:38 +00:00
parent b215dafcf1
commit adba5bab81

View File

@ -842,7 +842,7 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
event.m_keyCode = key_code;
#if wxUSE_UNICODE
event.m_uniChar = gdk_keyval_to_unicode(key_code ? key_code : keysym);
event.m_uniChar = gdk_keyval_to_unicode(key_code);
if ( !event.m_uniChar && event.m_keyCode <= WXK_DELETE )
{
// Set Unicode key code to the ASCII equivalent for compatibility. E.g.