From adba5bab81720f113c1e3a3451808afd2d8dcca5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 8 Dec 2012 00:37:38 +0000 Subject: [PATCH] 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 --- src/gtk/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 2fe5fc38ba..62b93d3a4e 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -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. -- 2.47.2